Skip to content
This repository was archived by the owner on Apr 14, 2020. It is now read-only.

Commit 437383e

Browse files
committed
chore(docs): calms the primary color down
1 parent f58f598 commit 437383e

4 files changed

Lines changed: 75 additions & 56 deletions

File tree

doczrc.js

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
const { css } = require('styled-components'); // eslint-disable-line
22

3-
const primary = 'rgb(133, 47, 255)';
4-
const altPrimary = 'rgba(200, 57, 236, 1)';
5-
const primaryText = 'rgba(255, 255, 255, 0.95)';
6-
const background = `linear-gradient(135deg, ${altPrimary} 25%, ${primary} 100%)`;
3+
const primary = 'rgba(157, 0, 255, 0.8)';
4+
const darkText = 'rgba(41, 52, 98, 0.85)';
5+
const lightText = 'rgba(255, 255, 255, 0.9)';
76

87
module.exports = {
9-
title: 'element motion for React.js 💨✨',
8+
title: 'element motion',
109
description: 'element motion for React.js 💨✨',
1110
typescript: true,
1211
dest: '/docs',
@@ -16,9 +15,9 @@ module.exports = {
1615
themeConfig: {
1716
colors: {
1817
primary,
19-
sidebarBg: background,
20-
sidebarText: primaryText,
21-
sidebarPrimary: primaryText,
18+
sidebarBg: '#fff',
19+
sidebarText: darkText,
20+
sidebarPrimary: primary,
2221
sidebarBorder: 'transparent',
2322
link: primary,
2423
},
@@ -28,9 +27,10 @@ module.exports = {
2827
'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
2928
font-size: 16px;
3029
line-height: 1.6;
30+
color: ${darkText} !important;
3131
32-
input::placeholder {
33-
color: rgba(255, 255, 255, 0.7);
32+
input[class^='Search__Input-']::placeholder {
33+
color: rgba(41, 52, 98, 0.64);
3434
}
3535
3636
div[class^='Logo__Wrapper-'] {
@@ -46,6 +46,7 @@ module.exports = {
4646
a[class^='MenuLink__LinkAnchor-'],
4747
a[class^='MenuLink__createLink-'] {
4848
font-weight: 400;
49+
color: ${darkText} !important;
4950
5051
:hover,
5152
:focus {
@@ -61,14 +62,22 @@ module.exports = {
6162
opacity: 0.9;
6263
}
6364
}
65+
66+
[class^='Logo__LogoText-'] {
67+
font-size: 2em;
68+
}
69+
70+
p {
71+
color: ${darkText};
72+
}
6473
`,
6574
h1: css`
6675
display: inline-block;
6776
margin: 60px 0 20px;
6877
font-size: 48px;
6978
font-weight: 600;
7079
letter-spacing: -0.06em;
71-
color: ${primaryText};
80+
color: ${lightText};
7281
position: relative;
7382
z-index: 1;
7483
@@ -79,7 +88,7 @@ module.exports = {
7988
right: 1px;
8089
left: 6px;
8190
bottom: 0;
82-
background: ${background};
91+
background: ${primary};
8392
transform: skew(-1deg, 1deg);
8493
z-index: -1;
8594
}
@@ -90,6 +99,7 @@ module.exports = {
9099
font-weight: 500;
91100
font-size: 28px;
92101
letter-spacing: -0.02em;
102+
color: ${darkText};
93103
`,
94104
},
95105
},

packages/core/src/__docs__/2-getting-started/docs.mdx

Lines changed: 48 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -45,52 +45,58 @@ For a simple move we can use the [Motion](/motion) and [Move](/move) components.
4545
For this example we are moving from one element to another over a state change.
4646

4747
<Playground>
48-
<Styled.SelectContainer>
49-
<Toggler interval onIntervalSet={curVal => (curVal ? undefined : 1)}>
50-
{({ shown, toggle }) =>
51-
shown ? (
52-
<Motion name={`item-${shown}`}>
53-
<Move>
54-
{motion => (
55-
<div {...motion}>
56-
<Select
57-
isSearchable={false}
58-
value={{}}
59-
styles={{
60-
singleValue: () => ({}),
61-
}}
62-
isClearable
63-
onChange={() => toggle()}
64-
formatOptionLabel={() => (
65-
<Styled.Value>
66-
{Styled.data[shown].title}
67-
<Styled.Description>{Styled.data[shown].description}</Styled.Description>
68-
</Styled.Value>
69-
)}
70-
/>
71-
</div>
72-
)}
73-
</Move>
74-
</Motion>
75-
) : (
76-
<Styled.List>
77-
{Styled.data.map((item, index) => (
78-
<Motion key={index} name={`item-${index}`}>
79-
<Move>
48+
<Styled.Center>
49+
<Common.SmallViewport>
50+
<Styled.SelectContainer>
51+
<Toggler interval onIntervalSet={curVal => (curVal ? undefined : 1)}>
52+
{({ shown, toggle }) =>
53+
shown ? (
54+
<Motion name={`item-${shown}`}>
55+
<Move scaleY={false}>
8056
{motion => (
81-
<Styled.Value onClick={() => toggle(`${index}`)} {...motion}>
82-
{item.title}
83-
<Styled.Description>{item.description}</Styled.Description>
84-
</Styled.Value>
57+
<div {...motion}>
58+
<Select
59+
isSearchable={false}
60+
value={{}}
61+
styles={{
62+
singleValue: () => ({}),
63+
}}
64+
isClearable
65+
onChange={() => toggle()}
66+
formatOptionLabel={() => (
67+
<Styled.Value>
68+
{Styled.data[shown].title}
69+
<Styled.Description>
70+
{Styled.data[shown].description}
71+
</Styled.Description>
72+
</Styled.Value>
73+
)}
74+
/>
75+
</div>
8576
)}
8677
</Move>
8778
</Motion>
88-
))}
89-
</Styled.List>
90-
)
91-
}
92-
</Toggler>
93-
</Styled.SelectContainer>
79+
) : (
80+
<Styled.List>
81+
{Styled.data.map((item, index) => (
82+
<Motion key={index} name={`item-${index}`}>
83+
<Move scaleY={false}>
84+
{motion => (
85+
<Styled.Value onClick={() => toggle(`${index}`)} {...motion}>
86+
{item.title}
87+
<Styled.Description>{item.description}</Styled.Description>
88+
</Styled.Value>
89+
)}
90+
</Move>
91+
</Motion>
92+
))}
93+
</Styled.List>
94+
)
95+
}
96+
</Toggler>
97+
</Styled.SelectContainer>
98+
</Common.SmallViewport>
99+
</Styled.Center>
94100
</Playground>
95101

96102
> **Tip -** Motions are triggered by state changes.

packages/core/src/__docs__/2-getting-started/styled.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ export const List = styled.div`
285285
`;
286286

287287
export const SelectContainer = styled.div`
288-
height: 398px;
288+
padding: 16px;
289+
padding-top: 100px;
290+
height: 100%;
291+
min-height: 600px;
289292
`;
290293

291294
export const data = [

packages/dev/src/SmallViewport.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const PixelContainer = styled.div<{ display: string }>`
66
height: 100vh;
77
max-width: 411px;
88
max-height: 731px;
9-
border-radius: 3px;
9+
border-radius: 8px;
1010
box-shadow: 0 1px 50px rgba(32, 33, 36, 0.1);
1111
border: 1px solid rgba(32, 33, 36, 0.1);
1212
box-sizing: border-box;

0 commit comments

Comments
 (0)