Skip to content

Commit 608ab21

Browse files
committed
auto scroll aside
1 parent 51d3e38 commit 608ab21

File tree

11 files changed

+43
-19
lines changed

11 files changed

+43
-19
lines changed

.babelrc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@
1515
"plugins": [
1616
"react-hot-loader/babel",
1717
"@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+
]
1925
],
2026
"env": {
2127
"test": {

TODO.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
- [*] Add Rematch the Redux framework
77
- [*] Add Redux dev tools
88
- [*] 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
1110
- [ ] Create a protected route component
1211
- [ ] Add new component for showing the notifications
1312
- [ ] Add table component that can recive data like these `<Table header={object[]} body={any[][]} minWidth={number} />`

config/theme/fonts.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
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',
55
bold: 700,
66
medium: 400,
77
light: 100,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"babel-loader": "^8.0.6",
4848
"babel-plugin-dynamic-import-node": "^1.2.0",
4949
"babel-plugin-import-inspector": "^2.0.0",
50+
"babel-plugin-styled-components": "^1.10.6",
5051
"babel-plugin-syntax-dynamic-import": "^6.18.0",
5152
"babel-plugin-transform-class-properties": "^6.24.1",
5253
"babel-plugin-transform-object-rest-spread": "^6.26.0",

src/App/AppGlobalStyles/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ const GlobalStyles = ({ theme }) => {
4848
margin: 0;
4949
}
5050
51+
h1,
52+
h2,
53+
h3,
54+
h4,
55+
h5,
56+
h6 {
57+
font-family: ${theme.secondaryFont}
58+
}
59+
5160
::-webkit-input-placeholder {
5261
color: ${theme.colors.gray400};
5362
}

src/App/DemoToBeDeleted/components/DemoHeader/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const DemoHeader = () => (
77
<Styled>
88
<Styled.Heading>React Base Code</Styled.Heading>
99
<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">
1111
Github
1212
</Styled.Link>
1313
</div>

src/App/DemoToBeDeleted/components/DemoHeader/styled.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,24 @@ import styled from 'styled-components';
22

33
const Styled = styled.header`
44
background: ${props => props.theme.colors.red500};
5-
padding: 2rem 1rem;
5+
padding: 2rem;
66
`;
77

88
const Heading = styled.h1`
9-
color: ${props => props.theme.colors.white}
9+
color: ${props => props.theme.colors.white};
10+
margin: 0 0 2rem 0;
1011
`;
1112

1213
const Link = styled.a`
13-
color: ${props => props.theme.colors.white}
14+
color: ${props => props.theme.colors.white};
1415
1516
&:visited {
16-
color: ${props => props.theme.colors.white}
17+
color: ${props => props.theme.colors.white};
1718
}
1819
1920
&:active,
2021
&:hover {
21-
color: ${props => props.theme.colors.white}
22+
color: ${props => props.theme.colors.white};
2223
}
2324
`;
2425

src/App/DemoToBeDeleted/styled.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,31 @@ const Styled = styled.aside`
66
top: 0;
77
bottom: 0;
88
width: 30rem;
9-
background: ${props => props.theme.colors.gray100};
9+
background-color: ${props => props.theme.colors.gray100};
10+
display: flex;
11+
flex-direction: column;
1012
`;
1113

1214
const List = styled.ul`
1315
margin: 0;
1416
padding: 0;
1517
display: block;
18+
padding: 1rem;
19+
height: 74px;
20+
height: calc(100% - 112px);
21+
overflow: auto;
1622
`;
1723

1824
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};
2127
color: ${props => props.theme.colors.gray900};
2228
`;
2329

2430
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;
2634
`;
2735

2836
Styled.List = List;

src/components/Modal/styled.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const ModalWrap = styled(Base)`
2727
const Modal = styled.div`
2828
margin: 3rem;
2929
background: ${props => props.theme.colors.white};
30-
color: ${props => props.theme.colors.gray400};
30+
color: ${props => props.theme.colors.gray900};
3131
border-radius: 4px;
3232
padding: 3rem 1rem;
3333
position: relative;

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta http-equiv="X-UA-Compatible" content="ie=edge">
77
<title>React base code</title>
88
<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">
1010
</head>
1111
<body>
1212
<div id="root"></div>

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1707,7 +1707,7 @@ babel-plugin-jest-hoist@^24.6.0:
17071707
dependencies:
17081708
"@types/babel__traverse" "^7.0.6"
17091709

1710-
"babel-plugin-styled-components@>= 1":
1710+
"babel-plugin-styled-components@>= 1", babel-plugin-styled-components@^1.10.6:
17111711
version "1.10.6"
17121712
resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.10.6.tgz#f8782953751115faf09a9f92431436912c34006b"
17131713
integrity sha512-gyQj/Zf1kQti66100PhrCRjI5ldjaze9O0M3emXRPAN80Zsf8+e1thpTpaXJXVHXtaM4/+dJEgZHyS9Its+8SA==

0 commit comments

Comments
 (0)