bradlc / babel-plugin-tailwind-components

Use Tailwind with any CSS-in-JS library
MIT License
331 stars 25 forks source link

Accessing color value #18

Closed ockam closed 5 years ago

ockam commented 5 years ago

Is it possible to access the colors values to apply them to custom css rules?

Like in this (NOT WORKING) example:

const Component = styled.div`
  box-shadow: 0 0 0 3px ${tw`colors['red']`};
`
ockam commented 5 years ago

Nevermind, I was looking in the wrong direction, you can simply import Tailwind config:

import { colors } from '../../../tailwind.config'