Feature #239: Replace early access label with network label (#311)

* Remove early access label

* Revert "Remove early access label"

This reverts commit 34682f0f6d9c1974a6e45c2a31358864931d9c1e.

* Replace early access label with network label

* Capitalzie first letter of the network name
This commit is contained in:
Mikhail Mikheev 2019-12-11 14:05:37 +04:00 committed by GitHub
parent a0a8ef5079
commit 747bcef17a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -16,7 +16,7 @@ import {
border, sm, md, headerHeight, border, sm, md, headerHeight,
} from '~/theme/variables' } from '~/theme/variables'
import Provider from './Provider' import Provider from './Provider'
import EarlyAccessLabel from './EarlyAccessLabel' import NetworkLabel from './NetworkLabel'
import SafeListHeader from './SafeListHeader' import SafeListHeader from './SafeListHeader'
const logo = require('../assets/gnosis-safe-logo.svg') const logo = require('../assets/gnosis-safe-logo.svg')
@ -74,7 +74,7 @@ const Layout = openHoc(
<Divider /> <Divider />
<SafeListHeader /> <SafeListHeader />
<Divider /> <Divider />
<EarlyAccessLabel /> <NetworkLabel />
<Spacer /> <Spacer />
<Provider open={open} toggle={toggle} info={providerInfo}> <Provider open={open} toggle={toggle} info={providerInfo}>
{(providerRef) => ( {(providerRef) => (

View File

@ -1,20 +1,22 @@
// @flow // @flow
import * as React from 'react' import * as React from 'react'
import { makeStyles } from '@material-ui/core/styles' import { makeStyles } from '@material-ui/core/styles'
import { getNetwork } from '~/config'
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 { import {
xs, sm, md, border, xs, sm, md, border,
} from '~/theme/variables' } from '~/theme/variables'
export const TOGGLE_SIDEBAR_BTN_TESTID = 'TOGGLE_SIDEBAR_BTN' const network = getNetwork()
const formattedNetwork = network[0].toUpperCase() + network.substring(1).toLowerCase()
const useStyles = makeStyles({ const useStyles = makeStyles({
container: { container: {
flexGrow: 0, flexGrow: 0,
padding: `0 ${md}`, padding: `0 ${md}`,
}, },
counter: { text: {
background: border, background: border,
padding: `${xs} ${sm}`, padding: `${xs} ${sm}`,
borderRadius: '3px', borderRadius: '3px',
@ -28,8 +30,8 @@ const EarlyAccessLabel = () => {
return ( return (
<Col start="xs" middle="xs" className={classes.container}> <Col start="xs" middle="xs" className={classes.container}>
<Paragraph size="xs" className={classes.counter}> <Paragraph size="xs" className={classes.text}>
Early access {formattedNetwork}
</Paragraph> </Paragraph>
</Col> </Col>
) )