Skip to content
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
@frycz

Description

@frycz

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 with alias property and display alias under the default name

  • extend PaletteSwatch with aliasesKey prop which will be used to read aliases from colors array and pass it to ColorSwatch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions