mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-28 10:25:17 +00:00
Added more UI changes to Header
This commit is contained in:
parent
ff79ca958a
commit
7d79501167
@ -4,15 +4,14 @@ import { withStyles } from '@material-ui/core/styles'
|
|||||||
import ExpansionPanel from '@material-ui/core/ExpansionPanel'
|
import ExpansionPanel from '@material-ui/core/ExpansionPanel'
|
||||||
import ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails'
|
import ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails'
|
||||||
import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary'
|
import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary'
|
||||||
import ExpansionPanelActions from '@material-ui/core/ExpansionPanelActions'
|
|
||||||
import ExpandMoreIcon from '@material-ui/icons/ExpandMore'
|
import ExpandMoreIcon from '@material-ui/icons/ExpandMore'
|
||||||
import Divider from '@material-ui/core/Divider'
|
import OpenInNew from '@material-ui/icons/OpenInNew'
|
||||||
import Paragraph from '~/components/layout/Paragraph'
|
import Paragraph from '~/components/layout/Paragraph'
|
||||||
import Col from '~/components/layout/Col'
|
import Col from '~/components/layout/Col'
|
||||||
import Img from '~/components/layout/Img'
|
import Img from '~/components/layout/Img'
|
||||||
import Button from '~/components/layout/Button'
|
import Button from '~/components/layout/Button'
|
||||||
import Refresh from '~/components/Refresh'
|
|
||||||
import Row from '~/components/layout/Row'
|
import Row from '~/components/layout/Row'
|
||||||
|
import Identicon from '~/components/Identicon'
|
||||||
import Spacer from '~/components/Spacer'
|
import Spacer from '~/components/Spacer'
|
||||||
import Connected from './Connected'
|
import Connected from './Connected'
|
||||||
|
|
||||||
@ -20,7 +19,6 @@ const logo = require('../assets/gnosis-safe-logo.svg')
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
provider: string,
|
provider: string,
|
||||||
reloadWallet: Function,
|
|
||||||
classes: Object,
|
classes: Object,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,6 +35,13 @@ const styles = theme => ({
|
|||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
|
user: {
|
||||||
|
alignItems: 'center',
|
||||||
|
},
|
||||||
|
address: {
|
||||||
|
flexGrow: 1,
|
||||||
|
textAlign: 'center',
|
||||||
|
},
|
||||||
heading: {
|
heading: {
|
||||||
fontSize: theme.typography.pxToRem(15),
|
fontSize: theme.typography.pxToRem(15),
|
||||||
},
|
},
|
||||||
@ -51,6 +56,11 @@ const styles = theme => ({
|
|||||||
},
|
},
|
||||||
details: {
|
details: {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
width: '350px',
|
||||||
|
border: '1px solid grey',
|
||||||
|
display: 'block',
|
||||||
|
padding: '12px 4px 4px',
|
||||||
|
marginLeft: 'auto',
|
||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
flexBasis: '33.33%',
|
flexBasis: '33.33%',
|
||||||
@ -68,12 +78,12 @@ const styles = theme => ({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const Header = ({ provider, reloadWallet, classes }: Props) => {
|
const Header = ({ provider, classes }: Props) => {
|
||||||
const providerText = provider ? `${provider} [Rinkeby]` : 'Not connected'
|
const providerText = provider ? `${provider} [Rinkeby]` : 'Not connected'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<ExpansionPanel elevation={0}>
|
<ExpansionPanel className={classes.root} elevation={0} defaultExpanded>
|
||||||
<ExpansionPanelSummary expandIcon={<ExpandMoreIcon />}>
|
<ExpansionPanelSummary expandIcon={<ExpandMoreIcon />}>
|
||||||
<Row grow>
|
<Row grow>
|
||||||
<Col start="xs" middle="xs" className={classes.logo}>
|
<Col start="xs" middle="xs" className={classes.logo}>
|
||||||
@ -89,16 +99,22 @@ const Header = ({ provider, reloadWallet, classes }: Props) => {
|
|||||||
{ provider &&
|
{ provider &&
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<ExpansionPanelDetails className={classes.details}>
|
<ExpansionPanelDetails className={classes.details}>
|
||||||
|
<Row grow margin="md">
|
||||||
<Connected provider={provider} />
|
<Connected provider={provider} />
|
||||||
<Refresh callback={reloadWallet} />
|
<Spacer />
|
||||||
|
</Row>
|
||||||
|
<Row className={classes.user} margin="md" grow >
|
||||||
|
<Identicon address="0x873faa4cddd5b157e8e5a57e7a5479afc5d30f0b" diameter={25} />
|
||||||
|
<Paragraph className={classes.address} size="sm" noMargin>0x873faa4cddd5b157e8e5a57e7a5479afc5d30f0b</Paragraph>
|
||||||
|
<OpenInNew style={{ height: '14px' }} />
|
||||||
|
</Row>
|
||||||
|
<Col align="center" margin="md" grow>
|
||||||
|
<Button size="small" variant="raised" color="secondary">DISCONNECT</Button>
|
||||||
|
</Col>
|
||||||
</ExpansionPanelDetails>
|
</ExpansionPanelDetails>
|
||||||
<ExpansionPanelActions>
|
|
||||||
<Button size="small">DISCONNECT</Button>
|
|
||||||
</ExpansionPanelActions>
|
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
}
|
}
|
||||||
</ExpansionPanel>
|
</ExpansionPanel>
|
||||||
<Divider />
|
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user