Skip to content

Commit b89540c

Browse files
committed
react-styler as file dependency
1 parent c28d741 commit b89540c

File tree

16 files changed

+89
-99
lines changed

16 files changed

+89
-99
lines changed

lib/react-styler/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "styler",
2+
"name": "react-styler",
33
"version": "1.0.0",
44
"description": "HOC that creates class names and extracts CSS into a static file",
55
"main": "index.js",
@@ -8,7 +8,7 @@
88
},
99
"author": "Jan Fischer <[email protected]> (http://www.bitworking.de)",
1010
"license": "ISC",
11-
"dependencies": {
12-
"react": "^16.8.3"
11+
"peerDependencies": {
12+
"react": "^16.0.0"
1313
}
1414
}

lib/react-styler/yarn.lock

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,3 @@
22
# yarn lockfile v1
33

44

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"

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"dependencies": {
5353
"express": "^4.16.3",
5454
"react": "^16.4.1",
55-
"react-dom": "^16.4.1"
55+
"react-dom": "^16.4.1",
56+
"react-styler": "file:./lib/react-styler"
5657
}
5758
}

postcss.config.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module.exports = {
2-
plugins: {
3-
'autoprefixer': {
4-
'grid': true
2+
plugins: {
3+
autoprefixer: {
4+
grid: true,
55
},
6-
'perfectionist': {
7-
'indentSize': 2,
8-
'format': 'expanded'
9-
}
10-
}
11-
}
6+
perfectionist: {
7+
indentSize: 2,
8+
format: 'expanded',
9+
},
10+
},
11+
};

src/components/atomic/atoms/ButtonSwitch/ButtonSwitch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22
import * as React from 'react';
3-
import styled from '../../../../../lib/react-styler';
3+
import styled from 'react-styler';
44

55
const Button = styled.button`
66
background-color: #ddd;

src/components/atomic/atoms/Headline/Headline.js

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,48 @@
11
// @flow
22
import * as React from 'react';
3-
import styled from '../../../../../lib/react-styler';
3+
import styled from 'react-styler';
44

5-
export const H1 = styled.h1`
6-
font-family: sans-serif;
5+
const font = `
6+
font-family: serif;
7+
font-weight: bold;
78
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;
916
`;
1017

1118
export const H2 = styled.h2`
12-
font-family: sans-serif;
13-
margin: 0;
14-
font-size: 30px;
19+
${font}
20+
font-size: 2.8rem;
1521
`;
1622

1723
export const H3 = styled.h3`
18-
font-family: sans-serif;
19-
margin: 0;
20-
font-size: 22px;
24+
${font}
25+
font-size: 2.4rem;
2126
`;
2227

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;
2731
`;
2832

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;
3336
`;
3437

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;
3941
`;
4042

4143
type PropsType = {
4244
tag: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6',
43-
children: React.ReactNode
45+
children: React.Node
4446
};
4547

4648
const headlines = {

src/components/atomic/atoms/Headline/Headline.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,36 @@
66
"children": "Das ist die Überschrift",
77
"tag": "h1"
88
}
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+
}
939
}
1040
]
1141
}

src/components/atomic/atoms/Paragraph/Paragraph.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled from '../../../../../lib/react-styler';
1+
import styled from 'react-styler';
22

33
export default styled.p`
44
font-family: sans-serif;

src/components/atomic/molecules/Block/Block.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @flow
22
import * as React from 'react';
3-
import styled from '../../../../../lib/react-styler';
3+
import styled from 'react-styler';
44
import Headline, { H1 } from '../../atoms/Headline/Headline';
55
import Paragraph from '../../atoms/Paragraph/Paragraph';
66
import globalVar from '../../../../global/globalVar';

src/components/playground/playground.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import React from 'react';
2-
// import styled from '../../../lib/react-styler';
3-
// import Heading from '../atomic/atoms/Heading/Heading';
42
import Paragraph from '../atomic/atoms/Paragraph/Paragraph';
53
import Block from '../atomic/molecules/Block/Block';
64

75
export default () => (
86
<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']} />
108
<Paragraph>
119
Noch ein Paragraph
1210
</Paragraph>

src/dev.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
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+
910
ReactDOM.render(React.createElement(Playground), container);

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
import React from 'react';
23
import ReactDOM from 'react-dom';
34

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
const baseConfig = require('./webpack/base.config');
22

3-
module.exports = baseConfig;
3+
module.exports = baseConfig;

webpack/base.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
const path = require('path');
23
const HtmlWebPackPlugin = require('html-webpack-plugin');
34
const CleanWebpackPlugin = require('clean-webpack-plugin');

webpack/scss.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
const path = require('path');
23
const HtmlWebPackPlugin = require('html-webpack-plugin');
34
const CleanWebpackPlugin = require('clean-webpack-plugin');

yarn.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6728,6 +6728,9 @@ react-is@^16.8.1:
67286728
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.3.tgz#4ad8b029c2a718fc0cfc746c8d4e1b7221e5387d"
67296729
integrity sha512-Y4rC1ZJmsxxkkPuMLwvKvlL1Zfpbcu+Bf4ZigkHup3v9EfdYhAlWAaVyA19olXq2o2mGn0w+dFKvk3pVVlYcIA==
67306730

6731+
"react-styler@file:./lib/react-styler":
6732+
version "1.0.0"
6733+
67316734
react@^16.4.1:
67326735
version "16.8.3"
67336736
resolved "https://registry.yarnpkg.com/react/-/react-16.8.3.tgz#c6f988a2ce895375de216edcfaedd6b9a76451d9"

0 commit comments

Comments
 (0)