Icon
An icon component which renders icon from vector library.
How to use
import React from 'react';
import {Icon} from '@gyri/native-ui-components';
const MyComponent = ({style, className}) => (
<Icon
style={style}
className={className}
source="camera"
color={MD3Colors.error50}
size={20}
/>
);
export default MyComponent;
Props
| # | Name | Data type | Default value | Values | Description |
|---|---|---|---|---|---|
| 1 | style | object | Custom style object | ||
| 2 | className | string | '' | It defined nativewind style classes. | |
| 3 | color | string | Color of the icon. | ||
| 4 | allowFontScaling | boolean | |||
| 5 | source | Icon to display. | |||
| 6 | size | number | Size of icon. |
For more details https://callstack.github.io/react-native-paper/docs/components/Icon