The Flash component informs users of successful or pending actions.
Examples
Default
<>
<Flash>Default Flash</Flash>
<Flashvariant="success">Success Flash</Flash>
<Flashvariant="warning">Warning Flash</Flash>
<Flashvariant="danger">Danger Flash</Flash>
</>
With an icon
Flash components with icons inside of them will automatically set the correct color for the icon depending on the type of Flash, as well as applying the correct right margin.
<Flashvariant="success">
<StyledOcticonicon={CheckIcon}/>
Success!
</Flash>
Props
Flash
Name
Type
Default
Description
full
boolean
false
Creates a full width Flash component
variant
'default' | 'success' | 'warning' | 'danger'
'default'
Sets the background color and border
ref
React.RefObject<HTMLDivElement>
A ref to the element rendered by this component. Because this component is polymorphic, the type will vary based on the value of the as prop.