Skip to content

Commit

Permalink
radium
Browse files Browse the repository at this point in the history
  • Loading branch information
cherkavi committed Feb 6, 2021
1 parent fcd2e51 commit 5908c95
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions reactjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,24 @@ npx create-react-app my-app
npm install --save-dev create-react-component-folder
npx crcf myComponent
```

## style pseudo selector
```js
# npm install --save radium

import Radium from 'radium';
style={
':hover': {
backgroundColor:"red"
},
'@media (min-witdh: 480px)':{
width: "350px"
}
}

export default Radium(MyComponent);

// for media - wrap root component with:
// import { StyleRoot } from 'radium';
// <StyleRoot> </StyleRoot>
```

0 comments on commit 5908c95

Please sign in to comment.