@navinc/base-react-components
Version:
Nav's Pattern Library
17 lines (14 loc) • 1.01 kB
Markdown
Use when you want users to take an action after reading the banner.
#### Props
- type: (string) determines the colors and default icons.
- `missingInfoAction|improveAction|positiveAction|neutralAction|warning`
- icon: (IconComponent) determines the icon next to the text. If no icon is provided it will use the default icon for the type specified
- Any react component that returns an svg
- actionIcon: (IconComponent) OPTIONAL - Overrides the icon used if there is no actionLabel
- Any react component that returns an svg
- copy: (string) the copy inside the banner
- action: (function()) function that fires when the banner/link is clicked on
- actionHref: (string) the link the user is take to when the banner/link is clicked on
- actionLabel: (string) The label of the link. If there is no actionLabel it will show a the actionIcon
- expandedStyles: (object) An object that expands the types available to the banner
- onDismiss: (function()) function that fires when you click the close button