File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212## Install
1313
14- This has peer dependencies of ` react ` and ` react-dom ` , which will have to be installed as well.
15-
1614``` sh
1715npm install --save styled-jss
1816```
1917
18+ Install peer dependencies ` react ` and ` react-dom ` in your project.
19+
20+
2021## Usage
2122
22- ### With default styled function
23+ ### With a default styled function
2324
2425``` js
2526import styled from ' styled-jss'
@@ -35,9 +36,9 @@ const PrimaryButton = styled(Button, {
3536})
3637```
3738
38- ### With base Style Sheet
39+ ### With a base Style Sheet
3940
40- Using base Style Sheet we can share classes between styled primitives.
41+ Using base Style Sheet we can share classes between styled primitives and render function .
4142
4243``` js
4344import { Styled , injectStyled } from ' styled-jss'
@@ -53,7 +54,7 @@ const styled = Styled({
5354 baseButton: {
5455 padding: 10 ,
5556 ' & + &' : {
56- marginLeft; 10
57+ marginLeft: 10
5758 }
5859 }
5960})
@@ -80,7 +81,7 @@ const MyComponent = ({classes}) => (
8081const MyStyledComponent = injectStyled (styled)(MyComponent)
8182```
8283
83- ### With custom JSS setup:
84+ ### With custom JSS setup
8485
8586` styled-jss ` use [ jss-preset-default] ( https://github.com/cssinjs/jss-preset-default ) by default.
8687But you can require ` createStyled ` and provide your custom jss instance.
You can’t perform that action at this time.
0 commit comments