• Get props to conform to OUIA spec

    For functional components, use the useOUIAProps function instead

    In class based components, create a state variable ouiaStateId to create a static generated ID: state = { ouiaStateId: getDefaultOUIAId(Chip.displayName) } This generated ID should remain alive as long as the component is not unmounted.

    Then add the attributes to the component {...getOUIAProps('OverflowChip', this.props.ouiaId !== undefined ? this.props.ouiaId : this.state.ouiaStateId)}

    Parameters

    • componentType: string

      OUIA component type

    • id: OuiaId

      OUIA component id

    • OptionalouiaSafe: boolean

      false if in animation

    Returns {
        data-ouia-component-id: OuiaId;
        data-ouia-component-type: string;
        data-ouia-safe: boolean;
    }

    • data-ouia-component-id: OuiaId
    • data-ouia-component-type: string
    • data-ouia-safe: boolean