0.2.2 • Published 3 years ago
@bdt-component-library/icon v0.2.2
Icon Component
About
This is a component published as its own package from our component library monorepo: https://github.com/BenefitsDataTrust/ui-components. Setup instructions, as well as higher-level goals and concerns can be found from the main project README.
Description
Handles display of standalone icons. Specs/assets here: https://zeroheight.com/990ea04ab/p/177b07-iconography
API
prop | type | required | default | explanation | ||||
---|---|---|---|---|---|---|---|---|
iconName | IconNames | yes | "exclamation-diamond" | Corresponds with the icon that is imported in the component | ||||
size | enum("tiny" | "small" | "medium" | "large") | no | "small" | Applies a size class to the icon | |
color | enum("warning" | "error" | "success" | "info" | "default") | no | "default" | Applies a color class to the icon |
classOverrides | { color: string } | no | {} | Allows specifying classes to override other specific classes in the component |
IconNames
prop | type | required | default | explanation | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
IconNames | enum("chevron-left" | "chevron-right" | "dollar" | "exclamation-circle" | "information-circle" | "plus-circle" | "check-circle" | "exclamation-diamond" | "print" | "user") | no | undefined | Enum of possible IconNames |