Refactor remove Safe styles

This commit is contained in:
Germán Martínez 2019-06-14 13:48:47 +02:00
parent d17eaec118
commit 0d42ec4fea
2 changed files with 121 additions and 116 deletions

View File

@ -18,65 +18,14 @@ import Link from '~/components/layout/Link'
import Paragraph from '~/components/layout/Paragraph' import Paragraph from '~/components/layout/Paragraph'
import Hairline from '~/components/layout/Hairline' import Hairline from '~/components/layout/Hairline'
import actions, { type Actions } from './actions' import actions, { type Actions } from './actions'
import { lg, md, sm, secondary, error, background, fancy } from '~/theme/variables' import { lg, md, secondary } from '~/theme/variables'
import { styles } from './style'
const openIconStyle = { const openIconStyle = {
height: '16px', height: '16px',
color: secondary, color: secondary,
} }
const styles = () => ({
heading: {
padding: `${sm} ${lg}`,
justifyContent: 'space-between',
maxHeight: '75px',
boxSizing: 'border-box',
},
container: {
minHeight: '369px',
},
manage: {
fontSize: '24px',
},
close: {
height: '35px',
width: '35px',
},
buttonRow: {
height: '84px',
justifyContent: 'center',
},
buttonRemove: {
color: '#fff',
backgroundColor: error,
},
name: {
textOverflow: 'ellipsis',
overflow: 'hidden',
},
userName: {
whiteSpace: 'nowrap',
},
owner: {
backgroundColor: background,
padding: md,
alignItems: 'center',
},
user: {
justifyContent: 'left',
},
description: {
padding: md,
},
open: {
paddingLeft: sm,
width: 'auto',
'&:hover': {
cursor: 'pointer',
},
},
})
type Props = Actions & { type Props = Actions & {
onClose: () => void, onClose: () => void,
classes: Object, classes: Object,
@ -94,8 +43,7 @@ const RemoveSafeComponent = ({
etherScanLink, etherScanLink,
safeName, safeName,
removeSafe, removeSafe,
}: Props) => { }: Props) => (
return (
<Modal <Modal
title="Remove Safe" title="Remove Safe"
description="Remove the selected Safe" description="Remove the selected Safe"
@ -135,7 +83,9 @@ const RemoveSafeComponent = ({
<Hairline /> <Hairline />
<Row className={classes.description}> <Row className={classes.description}>
<Paragraph noMargin> <Paragraph noMargin>
Removing a Safe only removes it from your interface. <b>It does not delete the Safe</b>. You can always add it back using the Safe's address. Removing a Safe only removes it from your interface.
<b>It does not delete the Safe</b>.
You can always add it back using the Safe's address.
</Paragraph> </Paragraph>
</Row> </Row>
</Block> </Block>
@ -159,8 +109,7 @@ const RemoveSafeComponent = ({
</Button> </Button>
</Row> </Row>
</Modal> </Modal>
) )
}
const RemoveSafeModal = withStyles(styles)(RemoveSafeComponent) const RemoveSafeModal = withStyles(styles)(RemoveSafeComponent)

View File

@ -0,0 +1,56 @@
// @flow
import {
lg, md, sm, error, background,
} from '~/theme/variables'
export const styles = (theme: Object) => ({
heading: {
padding: `${sm} ${lg}`,
justifyContent: 'space-between',
maxHeight: '75px',
boxSizing: 'border-box',
},
container: {
minHeight: '369px',
},
manage: {
fontSize: '24px',
},
close: {
height: '35px',
width: '35px',
},
buttonRow: {
height: '84px',
justifyContent: 'center',
},
buttonRemove: {
color: '#fff',
backgroundColor: error,
},
name: {
textOverflow: 'ellipsis',
overflow: 'hidden',
},
userName: {
whiteSpace: 'nowrap',
},
owner: {
backgroundColor: background,
padding: md,
alignItems: 'center',
},
user: {
justifyContent: 'left',
},
description: {
padding: md,
},
open: {
paddingLeft: sm,
width: 'auto',
'&:hover': {
cursor: 'pointer',
},
},
})