• Renders an icon from @Carbon/icons for React Native Most have a slight padding in the SVG. You can avoid this by adding a few extra pixels to size. For example 20 base icons can be 22 to compensate and match lineHeight for some compact font styles.

    Parameters

    • icon: unknown

      the icon to render (import AddIcon from '@carbon/icons/es/add/20' for example)

    • Optional width: string | number

      width of the icon, defaults to 100% (numbers are pixels but percent in string format are supported).

    • Optional height: string | number

      height of the icon, defaults to 100% (numbers are pixels but percent in string format are supported).

    • Optional color: string

      color of the icon, deafults to icon-primary from Carbon colors for the current theme.

    • Optional key: string | number

    Returns ReactNode

    • React Node to render on the screen. If the icon fails to be created an X icon is rendered.

Generated using TypeDoc