akiran / react-highlight

React component for syntax highlighting
https://react-highlight.neostack.com/
MIT License
768 stars 87 forks source link

Changing stylesheet doesnt change theme #69

Open dukesx opened 5 years ago

dukesx commented 5 years ago

Hi , i try to change the style sheet in html file of create-react-app , but it seems that only one dark theme is being applied for highlight. I tried Github and monokai sublime style sheets , it doesnt seem to work. Please help !

CrispyBacon1999 commented 5 years ago

If you're doing webpack based, the easiest way to do it would be to actually import the style in the javascript. That's how I do it and it works perfectly fine. All you need to do is import "highlight.js/styles/atom-one-dark.css"

dukesx commented 5 years ago

Oh okay , I will try this for sure

On Mon, 13 May 2019, 6:46 pm Josh Bacon, notifications@github.com wrote:

If you're doing webpack based, the easiest way to do it would be to actually import the style in the javascript. That's how I do it and it works perfectly fine. All you need to do is import "highlight.js/styles/atom-one-dark.css"

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/akiran/react-highlight/issues/69?email_source=notifications&email_token=ABNWE74UJSKVG3DNJFMIGETPVFWLDA5CNFSM4HMHXLR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVILNAQ#issuecomment-491828866, or mute the thread https://github.com/notifications/unsubscribe-auth/ABNWE74DMJ2URNGQBMUMCC3PVFWLDANCNFSM4HMHXLRQ .

MatteoGioioso commented 5 years ago

I have tried to import that way but nothing has changed. I am using nextjs

EDIT: Ok, I have solved by importing directly the theme with link tag