This repository was archived by the owner on Mar 14, 2021. It is now read-only.
This repository was archived by the owner on Mar 14, 2021. It is now read-only.
Support aliases for colors #11
Closed
Description
Now, colors palettes are enumerated from 0
to palette.length - 1
.
We want to support aliases for color arrays indices.
Example:
const colors = ['#aaa', '#bbb', '#bbb']
colors.aliases = ['default', 'active', 'disabled']
<PaletteSwatch token={"gray"} value={colors} aliasesKey='aliases' />
or
<ColorSwatch token={"error"} value={"#C0100F"} alias={"red"} />
Proposal
- extend
ColorSwatch
withalias
property and display alias under the default name
- extend
PaletteSwatch
withaliasesKey
prop which will be used to read aliases from colors array and pass it toColorSwatch
Metadata
Metadata
Assignees
Labels
No labels