Skip to main content

Icon

An icon component which renders icon from vector library.

Usage

import * as React from 'react';
import { Icon, MD3Colors } from 'react-native-paper';

const MyComponent = () => (
<Icon
source="camera"
color={MD3Colors.error50}
size={20}
/>
);

export default MyComponent;

Props

size (required)

Type: number

Size of icon.

allowFontScaling

Type: boolean

source (required)

Type: any

Icon to display.

color

Type: string

Color of the icon.

testID

Type: string

TestID used for testing purposes

theme

Type: ThemeProp