Skip to content

Commit 1d4862a

Browse files
committedNov 29, 2018
feat(welcome-card): start work
1 parent ba9419e commit 1d4862a

File tree

3 files changed

+75
-9
lines changed

3 files changed

+75
-9
lines changed
 

‎src/assets/images/dark-logo.svg

+20
Loading

‎src/components/welcome-card.js

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { Card } from 'antd'
2+
import PropTypes from 'prop-types'
3+
import React from 'react'
4+
import styled from 'styled-components/macro'
5+
6+
const StyledCardGrid = styled(Card.Grid)`
7+
align-items: center;
8+
display: flex;
9+
height: 325px;
10+
justify-content: center;
11+
`
12+
const StyledIconCardGrid = styled(StyledCardGrid)`
13+
border-radius: 12px;
14+
width: 393px;
15+
`
16+
const StyledTextCardGrid = styled(StyledCardGrid)`
17+
border-radius: 0 12px 12px 0;
18+
width: 413px;
19+
`
20+
const WelcomeCard = ({ icon, text, version }) => (
21+
<Card>
22+
<StyledIconCardGrid>
23+
{icon}
24+
{version}
25+
</StyledIconCardGrid>
26+
<StyledTextCardGrid>{text}</StyledTextCardGrid>
27+
</Card>
28+
)
29+
30+
WelcomeCard.propTypes = {
31+
icon: PropTypes.node.isRequired,
32+
text: PropTypes.string.isRequired,
33+
version: PropTypes.string.isRequired
34+
}
35+
36+
export default WelcomeCard

‎src/containers/home.js

+19-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
import { Button } from 'antd'
2+
import { ReactComponent as DarkLogo } from '../assets/images/dark-logo.svg'
23
import React from 'react'
34
import TopBanner from '../components/top-banner'
5+
import WelcomeCard from '../components/welcome-card'
6+
import { version } from '../../package.json'
47

58
export default () => (
6-
<TopBanner
7-
description="Get started by buying PNK if you don't have any already."
8-
extra={
9-
<Button size="large" type="primary">
10-
Buy PNK
11-
</Button>
12-
}
13-
title="Welcome to the Kleros Juror Dashboard!"
14-
/>
9+
<>
10+
<TopBanner
11+
description="Get started by buying PNK if you don't have any already."
12+
extra={
13+
<Button size="large" type="primary">
14+
Buy PNK
15+
</Button>
16+
}
17+
title="Welcome to the Kleros Juror Dashboard!"
18+
/>
19+
<WelcomeCard
20+
icon={<DarkLogo />}
21+
text="Welcome"
22+
version={`Athena release ${version}`}
23+
/>
24+
</>
1525
)

0 commit comments

Comments
 (0)
Please sign in to comment.