File tree 11 files changed +43
-19
lines changed 11 files changed +43
-19
lines changed Original file line number Diff line number Diff line change 15
15
"plugins" : [
16
16
" react-hot-loader/babel" ,
17
17
" @babel/plugin-syntax-dynamic-import" ,
18
- " @babel/plugin-proposal-class-properties"
18
+ " @babel/plugin-proposal-class-properties" ,
19
+ [
20
+ " babel-plugin-styled-components" ,
21
+ {
22
+ "displayName" : true
23
+ }
24
+ ]
19
25
],
20
26
"env" : {
21
27
"test" : {
Original file line number Diff line number Diff line change 6
6
- [ * ] Add Rematch the Redux framework
7
7
- [ * ] Add Redux dev tools
8
8
- [ * ] Add Prettier
9
- - [ ] Add a new section for layouts
10
- - [ ] Proper demo components with styles that can be removed quickly
9
+ - [ * ] Proper demo components with styles that can be removed quickly
11
10
- [ ] Create a protected route component
12
11
- [ ] Add new component for showing the notifications
13
12
- [ ] Add table component that can recive data like these ` <Table header={object[]} body={any[][]} minWidth={number} /> `
Original file line number Diff line number Diff line change 1
1
const fonts = {
2
- sans : '\'Open Sans\', sans-serif' ,
3
- serif : '\'Slabo 27px \', serif' ,
4
- mono : '\'Roboto Mono\', monospace' ,
2
+ sans : '\'PT Sans\', sans-serif' ,
3
+ serif : '\'PT Serif \', serif' ,
4
+ mono : 'monospace' ,
5
5
bold : 700 ,
6
6
medium : 400 ,
7
7
light : 100 ,
Original file line number Diff line number Diff line change 47
47
"babel-loader" : " ^8.0.6" ,
48
48
"babel-plugin-dynamic-import-node" : " ^1.2.0" ,
49
49
"babel-plugin-import-inspector" : " ^2.0.0" ,
50
+ "babel-plugin-styled-components" : " ^1.10.6" ,
50
51
"babel-plugin-syntax-dynamic-import" : " ^6.18.0" ,
51
52
"babel-plugin-transform-class-properties" : " ^6.24.1" ,
52
53
"babel-plugin-transform-object-rest-spread" : " ^6.26.0" ,
Original file line number Diff line number Diff line change @@ -48,6 +48,15 @@ const GlobalStyles = ({ theme }) => {
48
48
margin: 0;
49
49
}
50
50
51
+ h1,
52
+ h2,
53
+ h3,
54
+ h4,
55
+ h5,
56
+ h6 {
57
+ font-family: ${ theme . secondaryFont }
58
+ }
59
+
51
60
::-webkit-input-placeholder {
52
61
color: ${ theme . colors . gray400 } ;
53
62
}
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const DemoHeader = () => (
7
7
< Styled >
8
8
< Styled . Heading > React Base Code</ Styled . Heading >
9
9
< div >
10
- < Styled . Link href = "https://github.com/iamvijaydev/react-base-code" >
10
+ < Styled . Link target = "_blank" href = "https://github.com/iamvijaydev/react-base-code" >
11
11
Github
12
12
</ Styled . Link >
13
13
</ div >
Original file line number Diff line number Diff line change @@ -2,23 +2,24 @@ import styled from 'styled-components';
2
2
3
3
const Styled = styled . header `
4
4
background: ${ props => props . theme . colors . red500 } ;
5
- padding: 2rem 1rem ;
5
+ padding: 2rem;
6
6
` ;
7
7
8
8
const Heading = styled . h1 `
9
- color: ${ props => props . theme . colors . white }
9
+ color: ${ props => props . theme . colors . white } ;
10
+ margin: 0 0 2rem 0;
10
11
` ;
11
12
12
13
const Link = styled . a `
13
- color: ${ props => props . theme . colors . white }
14
+ color: ${ props => props . theme . colors . white } ;
14
15
15
16
&:visited {
16
- color: ${ props => props . theme . colors . white }
17
+ color: ${ props => props . theme . colors . white } ;
17
18
}
18
19
19
20
&:active,
20
21
&:hover {
21
- color: ${ props => props . theme . colors . white }
22
+ color: ${ props => props . theme . colors . white } ;
22
23
}
23
24
` ;
24
25
Original file line number Diff line number Diff line change @@ -6,23 +6,31 @@ const Styled = styled.aside`
6
6
top: 0;
7
7
bottom: 0;
8
8
width: 30rem;
9
- background: ${ props => props . theme . colors . gray100 } ;
9
+ background-color: ${ props => props . theme . colors . gray100 } ;
10
+ display: flex;
11
+ flex-direction: column;
10
12
` ;
11
13
12
14
const List = styled . ul `
13
15
margin: 0;
14
16
padding: 0;
15
17
display: block;
18
+ padding: 1rem;
19
+ height: 74px;
20
+ height: calc(100% - 112px);
21
+ overflow: auto;
16
22
` ;
17
23
18
24
export const ListItem = styled . li `
19
- padding: 1rem 2rem ;
20
- border-bottom : ${ props => '1px solid' + props . theme . colors . gray300 } ;
25
+ padding: 1rem;
26
+ background-color : ${ props => props . theme . colors . gray300 } ;
21
27
color: ${ props => props . theme . colors . gray900 } ;
22
28
` ;
23
29
24
30
export const ListSubItem = styled ( ListItem ) `
25
- padding-left: 4rem;
31
+ background-color: ${ props => props . theme . colors . gray100 } ;
32
+ border-bottom: ${ props => '1px solid' + props . theme . colors . gray300 } ;
33
+ padding: 1.5rem 1rem 1.5rem 3rem;
26
34
` ;
27
35
28
36
Styled . List = List ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const ModalWrap = styled(Base)`
27
27
const Modal = styled . div `
28
28
margin: 3rem;
29
29
background: ${ props => props . theme . colors . white } ;
30
- color: ${ props => props . theme . colors . gray400 } ;
30
+ color: ${ props => props . theme . colors . gray900 } ;
31
31
border-radius: 4px;
32
32
padding: 3rem 1rem;
33
33
position: relative;
Original file line number Diff line number Diff line change 6
6
< meta http-equiv ="X-UA-Compatible " content ="ie=edge ">
7
7
< title > React base code</ title >
8
8
< style data-styled-components ="true "> </ style >
9
- < link href ="https://fonts.googleapis.com/css?family=Open +Sans|Roboto+Mono|Slabo+27px " rel ="stylesheet ">
9
+ < link href ="https://fonts.googleapis.com/css?family=PT +Sans:400,700|PT+Serif:700&display=swap " rel ="stylesheet ">
10
10
</ head >
11
11
< body >
12
12
< div id ="root "> </ div >
Original file line number Diff line number Diff line change @@ -1707,7 +1707,7 @@ babel-plugin-jest-hoist@^24.6.0:
1707
1707
dependencies :
1708
1708
" @types/babel__traverse" " ^7.0.6"
1709
1709
1710
- " babel-plugin-styled-components@>= 1 " :
1710
+ " babel-plugin-styled-components@>= 1" , babel-plugin-styled-components@^1.10.6 :
1711
1711
version "1.10.6"
1712
1712
resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.6.tgz#f8782953751115faf09a9f92431436912c34006b"
1713
1713
integrity sha512-gyQj/Zf1kQti66100PhrCRjI5ldjaze9O0M3emXRPAN80Zsf8+e1thpTpaXJXVHXtaM4/+dJEgZHyS9Its+8SA==
You can’t perform that action at this time.
0 commit comments