
components
Accordion
v.1.0.0 | SaturnUsage
The name of the tokens object to style accordion is ACCORDION_STYLES.
You can not change the name of the tokens object.
Accordion component style can be configured through the variant prop:
- Variant: modify the styles of the Accordion.
The structure of the ACCORDION_STYLES object is:
Variants
Variants can modify the styles for the Accordion.
The tokens used are:
- container: CommonStyleType;
- decorative: CommonStyleType;
- headerExternalContainer: CommonStyleType;
- headerInternalContainer: CommonStyleType;
- headerMainContainer: CommonStyleType;
- trigger: CommonStyleType;
- link: CommonStyleType;
- triggerIconContainer: CommonStyleType;
- triggerIcon: IconTypes;
- subHeader: CommonStyleType;
- content: CommonStyleType;
- panel: CommonStyleType;
- footer?: CommonStyleType;
- titleContainer: CommonStyleType;
- titleIconContainer: CommonStyleType;
- title: TypographyTypes;
- headerRightContentContainer: CommonStyleType;
- titleIcon: IconTypes;
- lineSeparatorContainer?: CommonStyleType & { variant: string };
Some of these tokens are being deprecated and they will be removed in the version 2.0.0:
- link: Currently, it is used instead of trigger when tittle is not type of string. In the next major only trigger styles will be used.
12345678910
const ACCORDION_STYLES = { [VARIANT]: { container?: CommonStyleType; decorative?: CommonStyleType; headerExternalContainer?: CommonStyleType; headerInternalContainer?: CommonStyleType; headerMainContainer?: CommonStyleType; trigger?: CommonStyleType; link?: CommonStyleType; triggerIconContainer?: CommonStyleType;
Example
accordion theme object example:
12345678910
const ACCORDION_STYLES = { [VARIANT]: { container?: { background_color: 'background-color', display: 'display', flex_direction: 'flex-direction', position: 'position', border: 'border', }, headerExternalContainer?: {