Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Palette color by index #35

Open
sultan99 opened this issue Jul 27, 2018 · 0 comments
Open

Palette color by index #35

sultan99 opened this issue Jul 27, 2018 · 0 comments

Comments

@sultan99
Copy link

sultan99 commented Jul 27, 2018

Is there way to select palette color by index?

// my theme
theme.palette = {
  primary: [`#08C4FA`, `#34CEFA`, `#61D9FB`, `#8EE4FC`, `#BBEEFD`]
}

const Span = styled.span`
  color: ${palette({grayscale: 0}, 0)};
  font-family: ${font(`primary`)};
  font-size: ${prop(`size`, `14px`)};
`
<Span palette={{primary: 2}}>Text</Span>
// or
<Span palette="primary" tone={2}>Text</Span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant