How can I get some value (that I defined) inside tailwind.config.js file? #12999
Answered
by
wongjn
evgeniy-vashchuk
asked this question in
Help
-
Can I somehow get the value that I defined in tailwind.config.js to use it again? For example, I need next:
|
Beta Was this translation helpful? Give feedback.
Answered by
wongjn
Feb 22, 2024
Replies: 1 comment 4 replies
-
Have your colors as an object and then reference that object: const myColors: {
inherit: 'inherit',
current: 'currentColor',
transparent: 'transparent',
'white': '#FFFFFF',
'black': '#0C1A35',
'gray': '#D9DBDD',
'gray-light': '#F4F4F5',
'yellow': '#FFE759',
'orange': '#FF7300',
};
export default {
theme: {
colors: {
...myColors,
primary: myColors.orange, |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
evgeniy-vashchuk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have your colors as an object and then reference that object: