Skip to content

How can we store the css styles into a constant and use them? #6603

Closed Answered by snowystinger
NarendraKuruva asked this question in Q&A
Discussion options

You must be logged in to vote

Depends on what bundler you're using.
https://stackoverflow.com/questions/64688862/how-to-load-css-files-with-webpack
https://parceljs.org/languages/css/
https://vitejs.dev/guide/features#css-modules

Though if you've copied the CSS, then I suspect you're going to have even more problems because there are a number of plugins we run over the CSS and you won't have those necessarily.
https://github.com/adobe/react-spectrum/blob/main/postcss.config.js

If you can, you may just want to use the component as is, wait to update until RAC has the support you need, or back this conversation up to what changed which prompted the need for this.

We may have other suggestions if we back up to the root o…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@NarendraKuruva
Comment options

@snowystinger
Comment options

Answer selected by snowystinger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants