How to apply a css class to a child element of a component with javascript?

Asked

Viewed 64 times

0

I have a component called <PDFDownloadLink> I need to change the child <a> that he owns.

With syntax css I would do something like:

PDFDownloadLink a {

}

How could do the similar with js?

My styles are currently created with:

const styles = StyleSheet.create({

    PDFDownloadLink : {
       ...
    }

1 answer

1

just need to do this:

const styles = StyleSheet.create({

    PDFDownloadLink : {
       '& a': {
           ...
       }
    }
)}

I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.