-
-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
129 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import UnlockPropTypes from '../../propTypes' | ||
|
||
import React, { Component } from 'react' | ||
import Layout from '../interface/Layout' | ||
import CreatorAccount from './CreatorAccount' | ||
|
||
export default class Dashboard extends Component { | ||
render() { | ||
return ( | ||
<Layout title="Creator Dashboard"> | ||
<CreatorAccount network={this.props.network} account={this.props.account} /> | ||
</Layout> | ||
) | ||
} | ||
} | ||
|
||
Dashboard.propTypes = { | ||
account: UnlockPropTypes.account, | ||
network: UnlockPropTypes.network, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import PropTypes from 'prop-types' | ||
import React, { Component } from 'react' | ||
import styled from 'styled-components' | ||
import Header from './Header' | ||
import Unlock from './icons/Unlock' | ||
|
||
export default class Layout extends Component { | ||
render() { | ||
return ( | ||
<Container> | ||
<Left> | ||
<Unlock /> | ||
</Left> | ||
<Content> | ||
<Header title={this.props.title} /> | ||
{this.props.children} | ||
</Content> | ||
<Right /> | ||
</Container> | ||
) | ||
} | ||
} | ||
|
||
Layout.propTypes = { | ||
title: PropTypes.string, | ||
children: PropTypes.Component, | ||
} | ||
|
||
const Container = styled.div` | ||
display: grid; | ||
padding: 16px; | ||
grid-template-columns: 1fr minmax(300px, 65%) 1fr; | ||
` | ||
|
||
const Left = styled.div` | ||
display: grid; | ||
font-size: 56px; | ||
align-items: top; | ||
` | ||
|
||
const Right = styled.div` | ||
` | ||
|
||
const Content = styled.div` | ||
display: grid; | ||
row-gap: 20px; | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react' | ||
import { storiesOf } from '@storybook/react' | ||
import Dashboard from '../../components/creator/Dashboard' | ||
|
||
storiesOf('Dashboard') | ||
.add('the dashboard', () => { | ||
const account = { | ||
address: '0x3ca206264762caf81a8f0a843bbb850987b41e16', | ||
} | ||
const network = { | ||
name: 4, | ||
} | ||
return ( | ||
<Dashboard network={network} account={account} /> | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import { storiesOf } from '@storybook/react' | ||
import Layout from '../../components/interface/Layout' | ||
|
||
storiesOf('Layout') | ||
.add('the layout', () => { | ||
return ( | ||
<Layout title="The story of Unlock" /> | ||
) | ||
}) |