Z
Z
zwezew2019-03-17 15:25:20
React
zwezew, 2019-03-17 15:25:20

How to add styled styles to body on click?

If body styles are set via createGlobalStyle, then how to add additional styles to body on click on the component button?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-03-17
@zwezew

As everywhere:
document.body.classList.add('some-class');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question