Skip to content

Commit 2137116

Browse files
committed
Final rendering
1 parent 2c9e89d commit 2137116

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed

src/theme/components/Post.tsx

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
* limitations under the License.
1515
*/
1616
import React, { ReactNode } from 'react';
17-
import { Button, Flex, Heading, Text } from 'rebass/styled-components';
17+
import { Flex, Heading, Text } from 'rebass/styled-components';
1818
import styled from 'styled-components';
1919
import { PostDescription } from '../types';
2020
import { Card, CardContainer } from './Card';
2121
import CardFooter from './CardFooter';
2222
import { Fade } from 'react-awesome-reveal';
23-
import { Link as RebassLink } from 'rebass';
23+
import { Link } from 'rebass';
24+
import colors from '../colors.json';
2425

2526
const cardMinWidth = '350px';
2627

@@ -95,15 +96,9 @@ export const PostContainer = ({
9596
{pageId && (
9697
<DownFade>
9798
<Flex justifyContent="center" mt="4" mb="2" fontSize={[2, 3]}>
98-
<Button variant="more">
99-
<RebassLink
100-
href={`/${pageId}`}
101-
color="inherit"
102-
style={{ textDecorationLine: 'inherit' }}
103-
>
104-
More
105-
</RebassLink>
106-
</Button>
99+
<MoreButton>
100+
<StyledLink href={`/${pageId}`}>More</StyledLink>
101+
</MoreButton>
107102
</Flex>
108103
</DownFade>
109104
)}
@@ -116,3 +111,19 @@ const DownFade = ({ children }: { children: ReactNode }): JSX.Element => (
116111
{children}
117112
</Fade>
118113
);
114+
115+
const StyledLink = styled(Link)``;
116+
const MoreButton = styled(Card)`
117+
border-width: 2px;
118+
padding: 0;
119+
color: ${colors.text};
120+
background: ${colors.background};
121+
122+
${StyledLink} {
123+
text-decoration: none;
124+
display: block;
125+
padding: 8px 70px;
126+
font-weight: 600;
127+
color: inherit;
128+
}
129+
`;

src/theme/theme.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ export const theme: Theme = {
3838
bg: colors.secondary,
3939
fontWeight: '600',
4040
},
41-
more: {
42-
textDecoration: 'none',
43-
color: colors.primary,
44-
bg: colors.background,
45-
fontWeight: '600',
46-
border: `3px solid ${colors.secondary}`,
47-
boxShadow: `inset 0 0 2px ${colors.muted}`,
48-
p: '8px 10%',
49-
},
5041
},
5142
fonts: {
5243
body: 'Cabin, Open Sans, sans-serif',

0 commit comments

Comments
 (0)