From c5193281d7e752ed727a6e327007478d90e4dc32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Wed, 22 May 2019 14:20:36 +0200 Subject: [PATCH] Add basic settings page --- src/routes/safe/components/Layout.jsx | 9 +++ src/routes/safe/components/Settings/index.jsx | 73 +++++++++++++++++++ src/routes/safe/components/Settings/style.js | 17 +++++ 3 files changed, 99 insertions(+) create mode 100644 src/routes/safe/components/Settings/index.jsx create mode 100644 src/routes/safe/components/Settings/style.js diff --git a/src/routes/safe/components/Layout.jsx b/src/routes/safe/components/Layout.jsx index 4383a63f..fe148dca 100644 --- a/src/routes/safe/components/Layout.jsx +++ b/src/routes/safe/components/Layout.jsx @@ -19,6 +19,7 @@ import { } from '~/theme/variables' import { copyToClipboard } from '~/utils/clipboard' import Balances from './Balances' +import Settings from './Settings' type Props = SelectorProps & { classes: Object, @@ -141,6 +142,14 @@ class Layout extends React.Component { createTransaction={createTransaction} /> )} + {tabIndex === 2 && ( + + )} ) } diff --git a/src/routes/safe/components/Settings/index.jsx b/src/routes/safe/components/Settings/index.jsx new file mode 100644 index 00000000..96b3f8d7 --- /dev/null +++ b/src/routes/safe/components/Settings/index.jsx @@ -0,0 +1,73 @@ +// @flow +import * as React from 'react' +import { withStyles } from '@material-ui/core/styles' +import Col from '~/components/layout/Col' +import Row from '~/components/layout/Row' +import RemoveSafeModal from './RemoveSafeModal' +import Paragraph from '~/components/layout/Paragraph' + +import { styles } from './style' + +type State = { + showRemoveSafe: boolean, +} + +type Props = { + classes: Object, + granted: boolean, + etherScanLink: string, + safeAddress: string, + safeName: string, +} + +type Action = 'RemoveSafe' + +class Settings extends React.Component { + state = { + showRemoveSafe: false, + } + + onShow = (action: Action) => () => { + this.setState(() => ({ [`show${action}`]: true })) + } + + onHide = (action: Action) => () => { + this.setState(() => ({ [`show${action}`]: false })) + } + + render() { + const { showRemoveSafe } = this.state + const { + classes, + granted, + etherScanLink, + safeAddress, + safeName, + } = this.props + + return ( + + + + Settings + + + + Remove Safe + + + + + Settings page content + + ) + } +} + +export default withStyles(styles)(Settings) diff --git a/src/routes/safe/components/Settings/style.js b/src/routes/safe/components/Settings/style.js new file mode 100644 index 00000000..d6aa5104 --- /dev/null +++ b/src/routes/safe/components/Settings/style.js @@ -0,0 +1,17 @@ +// @flow +import { sm, xs } from '~/theme/variables' + +export const styles = (theme: Object) => ({ + settings: { + letterSpacing: '-0.5px', + }, + message: { + margin: `${sm} 0`, + }, + links: { + textDecoration: 'underline', + '&:hover': { + cursor: 'pointer', + }, + }, +})