File tree Expand file tree Collapse file tree 16 files changed +89
-99
lines changed Expand file tree Collapse file tree 16 files changed +89
-99
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " styler" ,
2
+ "name" : " react- styler" ,
3
3
"version" : " 1.0.0" ,
4
4
"description" : " HOC that creates class names and extracts CSS into a static file" ,
5
5
"main" : " index.js" ,
8
8
},
9
9
"author" :
" Jan Fischer <[email protected] > (http://www.bitworking.de)" ,
10
10
"license" : " ISC" ,
11
- "dependencies " : {
12
- "react" : " ^16.8.3 "
11
+ "peerDependencies " : {
12
+ "react" : " ^16.0.0 "
13
13
}
14
14
}
Original file line number Diff line number Diff line change 2
2
# yarn lockfile v1
3
3
4
4
5
- " js-tokens@^3.0.0 || ^4.0.0 " :
6
- version "4.0.0"
7
- resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
8
- integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
9
-
10
- loose-envify@^1.1.0, loose-envify@^1.4.0 :
11
- version "1.4.0"
12
- resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
13
- integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
14
- dependencies :
15
- js-tokens "^3.0.0 || ^4.0.0"
16
-
17
- object-assign@^4.1.1 :
18
- version "4.1.1"
19
- resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
20
- integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
21
-
22
- prop-types@^15.6.2 :
23
- version "15.7.2"
24
- resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
25
- integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
26
- dependencies :
27
- loose-envify "^1.4.0"
28
- object-assign "^4.1.1"
29
- react-is "^16.8.1"
30
-
31
- react-is@^16.8.1 :
32
- version "16.8.3"
33
- resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.3.tgz#4ad8b029c2a718fc0cfc746c8d4e1b7221e5387d"
34
- integrity sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA==
35
-
36
- react@^16.8.3 :
37
- version "16.8.3"
38
- resolved "https://registry.yarnpkg.com/react/-/react-16.8.3.tgz#c6f988a2ce895375de216edcfaedd6b9a76451d9"
39
- integrity sha512-3UoSIsEq8yTJuSu0luO1QQWYbgGEILm+eJl2QN/VLDi7hL+EN18M3q3oVZwmVzzBJ3DkM7RMdRwBmZZ+b4IzSA==
40
- dependencies :
41
- loose-envify "^1.1.0"
42
- object-assign "^4.1.1"
43
- prop-types "^15.6.2"
44
- scheduler "^0.13.3"
45
-
46
- scheduler@^0.13.3 :
47
- version "0.13.3"
48
- resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.3.tgz#bed3c5850f62ea9c716a4d781f9daeb9b2a58896"
49
- integrity sha512-UxN5QRYWtpR1egNWzJcVLk8jlegxAugswQc984lD3kU7NuobsO37/sRfbpTdBjtnD5TBNFA2Q2oLV5+UmPSmEQ==
50
- dependencies :
51
- loose-envify "^1.1.0"
52
- object-assign "^4.1.1"
Original file line number Diff line number Diff line change 52
52
"dependencies" : {
53
53
"express" : " ^4.16.3" ,
54
54
"react" : " ^16.4.1" ,
55
- "react-dom" : " ^16.4.1"
55
+ "react-dom" : " ^16.4.1" ,
56
+ "react-styler" : " file:./lib/react-styler"
56
57
}
57
58
}
Original file line number Diff line number Diff line change 1
1
module . exports = {
2
- plugins : {
3
- ' autoprefixer' : {
4
- ' grid' : true
2
+ plugins : {
3
+ autoprefixer : {
4
+ grid : true ,
5
5
} ,
6
- ' perfectionist' : {
7
- ' indentSize' : 2 ,
8
- ' format' : 'expanded'
9
- }
10
- }
11
- }
6
+ perfectionist : {
7
+ indentSize : 2 ,
8
+ format : 'expanded' ,
9
+ } ,
10
+ } ,
11
+ } ;
Original file line number Diff line number Diff line change 1
1
// @flow
2
2
import * as React from 'react' ;
3
- import styled from '../../../../../lib/ react-styler' ;
3
+ import styled from 'react-styler' ;
4
4
5
5
const Button = styled . button `
6
6
background-color: #ddd;
Original file line number Diff line number Diff line change 1
1
// @flow
2
2
import * as React from 'react' ;
3
- import styled from '../../../../../lib/ react-styler' ;
3
+ import styled from 'react-styler' ;
4
4
5
- export const H1 = styled . h1 `
6
- font-family: sans-serif;
5
+ const font = `
6
+ font-family: serif;
7
+ font-weight: bold;
7
8
margin: 0;
8
- font-size: 42px;
9
+ margin-bottom: 1rem;
10
+ line-height: normal;
11
+ ` ;
12
+
13
+ export const H1 = styled . h1 `
14
+ ${ font }
15
+ font-size: 3.6rem;
9
16
` ;
10
17
11
18
export const H2 = styled . h2 `
12
- font-family: sans-serif;
13
- margin: 0;
14
- font-size: 30px;
19
+ ${ font }
20
+ font-size: 2.8rem;
15
21
` ;
16
22
17
23
export const H3 = styled . h3 `
18
- font-family: sans-serif;
19
- margin: 0;
20
- font-size: 22px;
24
+ ${ font }
25
+ font-size: 2.4rem;
21
26
` ;
22
27
23
- export const H4 = styled . h3 `
24
- font-family: sans-serif;
25
- margin: 0;
26
- font-size: 22px;
28
+ export const H4 = styled . h4 `
29
+ ${ font }
30
+ font-size: 2rem;
27
31
` ;
28
32
29
- export const H5 = styled . h3 `
30
- font-family: sans-serif;
31
- margin: 0;
32
- font-size: 22px;
33
+ export const H5 = styled . h5 `
34
+ ${ font }
35
+ font-size: 1.7rem;
33
36
` ;
34
37
35
- export const H6 = styled . h3 `
36
- font-family: sans-serif;
37
- margin: 0;
38
- font-size: 22px;
38
+ export const H6 = styled . h6 `
39
+ ${ font }
40
+ font-size: 1.4rem;
39
41
` ;
40
42
41
43
type PropsType = {
42
44
tag : 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' ,
43
- children : React . ReactNode
45
+ children : React . Node
44
46
} ;
45
47
46
48
const headlines = {
Original file line number Diff line number Diff line change 6
6
"children" : " Das ist die Überschrift" ,
7
7
"tag" : " h1"
8
8
}
9
+ },
10
+ {
11
+ "props" : {
12
+ "children" : " Das ist die Überschrift" ,
13
+ "tag" : " h2"
14
+ }
15
+ },
16
+ {
17
+ "props" : {
18
+ "children" : " Das ist die Überschrift" ,
19
+ "tag" : " h3"
20
+ }
21
+ },
22
+ {
23
+ "props" : {
24
+ "children" : " Das ist die Überschrift" ,
25
+ "tag" : " h4"
26
+ }
27
+ },
28
+ {
29
+ "props" : {
30
+ "children" : " Das ist die Überschrift" ,
31
+ "tag" : " h5"
32
+ }
33
+ },
34
+ {
35
+ "props" : {
36
+ "children" : " Das ist die Überschrift" ,
37
+ "tag" : " h6"
38
+ }
9
39
}
10
40
]
11
41
}
Original file line number Diff line number Diff line change 1
- import styled from '../../../../../lib/ react-styler' ;
1
+ import styled from 'react-styler' ;
2
2
3
3
export default styled . p `
4
4
font-family: sans-serif;
Original file line number Diff line number Diff line change 1
1
// @flow
2
2
import * as React from 'react' ;
3
- import styled from '../../../../../lib/ react-styler' ;
3
+ import styled from 'react-styler' ;
4
4
import Headline , { H1 } from '../../atoms/Headline/Headline' ;
5
5
import Paragraph from '../../atoms/Paragraph/Paragraph' ;
6
6
import globalVar from '../../../../global/globalVar' ;
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- // import styled from '../../../lib/react-styler';
3
- // import Heading from '../atomic/atoms/Heading/Heading';
4
2
import Paragraph from '../atomic/atoms/Paragraph/Paragraph' ;
5
3
import Block from '../atomic/molecules/Block/Block' ;
6
4
7
5
export default ( ) => (
8
6
< div >
9
- < Block heading = "Wir sind im Playground" paragraphs = { [ '1. Paragraph' , '2. Paragraph' ] } />
7
+ < Block headline = "Wir sind im Playground" paragraphs = { [ '1. Paragraph' , '2. Paragraph' ] } />
10
8
< Paragraph >
11
9
Noch ein Paragraph
12
10
</ Paragraph >
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
2
- import ReactDOM from 'react-dom' ;
3
- import Playground from './components/playground/playground' ;
4
-
5
- import './main.scss' ;
6
-
7
- let container = document . getElementById ( 'index' ) ;
8
-
1
+ /* eslint-disable */
2
+ import React from 'react' ;
3
+ import ReactDOM from 'react-dom' ;
4
+ import Playground from './components/playground/playground' ;
5
+
6
+ import './main.scss' ;
7
+
8
+ const container = document . getElementById ( 'index' ) ;
9
+
9
10
ReactDOM . render ( React . createElement ( Playground ) , container ) ;
Original file line number Diff line number Diff line change
1
+ /* eslint-disable */
1
2
import React from 'react' ;
2
3
import ReactDOM from 'react-dom' ;
3
4
Original file line number Diff line number Diff line change 1
1
const baseConfig = require ( './webpack/base.config' ) ;
2
2
3
- module . exports = baseConfig ;
3
+ module . exports = baseConfig ;
Original file line number Diff line number Diff line change
1
+ /* eslint-disable */
1
2
const path = require ( 'path' ) ;
2
3
const HtmlWebPackPlugin = require ( 'html-webpack-plugin' ) ;
3
4
const CleanWebpackPlugin = require ( 'clean-webpack-plugin' ) ;
Original file line number Diff line number Diff line change
1
+ /* eslint-disable */
1
2
const path = require ( 'path' ) ;
2
3
const HtmlWebPackPlugin = require ( 'html-webpack-plugin' ) ;
3
4
const CleanWebpackPlugin = require ( 'clean-webpack-plugin' ) ;
Original file line number Diff line number Diff line change @@ -6728,6 +6728,9 @@ react-is@^16.8.1:
6728
6728
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.3.tgz#4ad8b029c2a718fc0cfc746c8d4e1b7221e5387d"
6729
6729
integrity sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA==
6730
6730
6731
+ " react-styler@file:./lib/react-styler " :
6732
+ version "1.0.0"
6733
+
6731
6734
react@^16.4.1 :
6732
6735
version "16.8.3"
6733
6736
resolved "https://registry.yarnpkg.com/react/-/react-16.8.3.tgz#c6f988a2ce895375de216edcfaedd6b9a76451d9"
You can’t perform that action at this time.
0 commit comments