reactjs - Target specific CSS classes with Styled Components -


how go styling react-datepicker styled-components? datepicker library looks uses type of bem style (screenshot below) use provided class names , style using sass. but, how target class names styled-components? possible?

enter image description here

since styled-components css™ you'd other style sheet, using class names react-datepicker provided.

the difference you'll have wrap datepicker in 1 wrapper styled component applies of these classes:

const wrapper = styled.div`   &.react-datepicker {     color: blue;   } `  <wrapper>   <datepicker /> </wrapper> 

Comments

Popular posts from this blog

python - What's the Pythonic way to report nonfatal errors in a parser? -

sql server - Deadlock occuring in Clustered Columnstore index -

angular - Converting AngularJS deffered promise to AngularX observable for JSOM -