Icon
Use the icon component to display Octicons with an optional background
import {Icon} from '@primer/react-brand'
Name | Type | Default | Description |
---|---|---|---|
icon | OcticonProps | React.ReactElement<OcticonProps> | The Octicon component to render | |
color | 'default' , 'blue' , 'coral' , 'green' , 'gray' , 'indigo' , 'lemon' , 'lime' , 'orange' , 'pink' , 'purple' , 'red' , 'teal' , 'yellow' | 'default' | The color of the icon |
size | 'small' , 'medium' , 'large' , 20 , 24 , 28 , 32 , 36 , 40 , 44 | 'small' | The size of the icon |
hasBackground | boolean | false | Whether to show a background behind the icon |
className | string | Additional CSS class for the icon |
All other props are forwarded to the underlying SVG element.