Create settings menu
This commit is contained in:
parent
500b696e7b
commit
d17eaec118
|
@ -1,11 +1,12 @@
|
||||||
// @flow
|
// @flow
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { withStyles } from '@material-ui/core/styles'
|
import { withStyles } from '@material-ui/core/styles'
|
||||||
|
import Block from '~/components/layout/Block'
|
||||||
import Col from '~/components/layout/Col'
|
import Col from '~/components/layout/Col'
|
||||||
import Row from '~/components/layout/Row'
|
import Row from '~/components/layout/Row'
|
||||||
import RemoveSafeModal from './RemoveSafeModal'
|
import RemoveSafeModal from './RemoveSafeModal'
|
||||||
import Paragraph from '~/components/layout/Paragraph'
|
import Paragraph from '~/components/layout/Paragraph'
|
||||||
|
import Hairline from '~/components/layout/Hairline'
|
||||||
import { styles } from './style'
|
import { styles } from './style'
|
||||||
|
|
||||||
type State = {
|
type State = {
|
||||||
|
@ -25,6 +26,11 @@ type Action = 'RemoveSafe'
|
||||||
class Settings extends React.Component<Props, State> {
|
class Settings extends React.Component<Props, State> {
|
||||||
state = {
|
state = {
|
||||||
showRemoveSafe: false,
|
showRemoveSafe: false,
|
||||||
|
menuOptionIndex: 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChange = menuOptionIndex => () => {
|
||||||
|
this.setState({ menuOptionIndex })
|
||||||
}
|
}
|
||||||
|
|
||||||
onShow = (action: Action) => () => {
|
onShow = (action: Action) => () => {
|
||||||
|
@ -36,7 +42,7 @@ class Settings extends React.Component<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { showRemoveSafe } = this.state
|
const { showRemoveSafe, menuOptionIndex } = this.state
|
||||||
const {
|
const {
|
||||||
classes,
|
classes,
|
||||||
granted,
|
granted,
|
||||||
|
@ -64,7 +70,48 @@ class Settings extends React.Component<Props, State> {
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
Settings page content
|
<Block className={classes.root}>
|
||||||
|
<Col xs={3} layout="column">
|
||||||
|
<Block className={classes.menu}>
|
||||||
|
<Row className={classes.menuOption} onClick={this.handleChange(1)}>
|
||||||
|
Safe name
|
||||||
|
</Row>
|
||||||
|
<Hairline />
|
||||||
|
{granted && (
|
||||||
|
<React.Fragment>
|
||||||
|
<Row className={classes.menuOption} onClick={this.handleChange(2)}>
|
||||||
|
Owners
|
||||||
|
</Row>
|
||||||
|
<Hairline />
|
||||||
|
<Row className={classes.menuOption} onClick={this.handleChange(3)}>
|
||||||
|
Required confirmations
|
||||||
|
</Row>
|
||||||
|
<Hairline />
|
||||||
|
<Row className={classes.menuOption} onClick={this.handleChange(4)}>
|
||||||
|
Modules
|
||||||
|
</Row>
|
||||||
|
<Hairline />
|
||||||
|
</React.Fragment>
|
||||||
|
)}
|
||||||
|
</Block>
|
||||||
|
</Col>
|
||||||
|
<Col xs={9} layout="column">
|
||||||
|
<Block className={classes.container}>
|
||||||
|
{menuOptionIndex === 1 && (
|
||||||
|
<p>To be done</p>
|
||||||
|
)}
|
||||||
|
{granted && menuOptionIndex === 2 && (
|
||||||
|
<p>To be done</p>
|
||||||
|
)}
|
||||||
|
{granted && menuOptionIndex === 3 && (
|
||||||
|
<p>To be done</p>
|
||||||
|
)}
|
||||||
|
{granted && menuOptionIndex === 4 && (
|
||||||
|
<p>To be done</p>
|
||||||
|
)}
|
||||||
|
</Block>
|
||||||
|
</Col>
|
||||||
|
</Block>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,30 @@
|
||||||
// @flow
|
// @flow
|
||||||
import { sm, xs } from '~/theme/variables'
|
import {
|
||||||
|
sm, md, lg, border,
|
||||||
|
} from '~/theme/variables'
|
||||||
|
|
||||||
export const styles = (theme: Object) => ({
|
export const styles = (theme: Object) => ({
|
||||||
|
root: {
|
||||||
|
backgroundColor: 'white',
|
||||||
|
boxShadow: '0 -1px 4px 0 rgba(74, 85, 121, 0.5)',
|
||||||
|
minHeight: '400px',
|
||||||
|
display: 'flex',
|
||||||
|
},
|
||||||
settings: {
|
settings: {
|
||||||
letterSpacing: '-0.5px',
|
letterSpacing: '-0.5px',
|
||||||
},
|
},
|
||||||
|
menu: {
|
||||||
|
borderRight: `solid 1px ${border}`,
|
||||||
|
height: '100%',
|
||||||
|
},
|
||||||
|
menuOption: {
|
||||||
|
padding: lg,
|
||||||
|
alignItems: 'center',
|
||||||
|
cursor: 'pointer',
|
||||||
|
},
|
||||||
|
container: {
|
||||||
|
padding: lg,
|
||||||
|
},
|
||||||
message: {
|
message: {
|
||||||
margin: `${sm} 0`,
|
margin: `${sm} 0`,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue