Refactor: Moving Token styles to separate file #73

This commit is contained in:
apanizo 2018-10-31 13:21:13 +01:00
parent fba1b9cbcd
commit 4e019af2a4
3 changed files with 76 additions and 74 deletions

View File

@ -22,81 +22,9 @@ import Divider from '~/components/layout/Divider'
import Hairline from '~/components/layout/Hairline' import Hairline from '~/components/layout/Hairline'
import Spacer from '~/components/Spacer' import Spacer from '~/components/Spacer'
import Row from '~/components/layout/Row' import Row from '~/components/layout/Row'
import { lg, md, sm, xs, mediumFontSize, border } from '~/theme/variables'
import { type Token } from '~/routes/tokens/store/model/token' import { type Token } from '~/routes/tokens/store/model/token'
import actions, { type Actions } from './actions' import actions, { type Actions } from './actions'
import { styles } from './style'
const styles = () => ({
root: {
minHeight: '132px',
},
heading: {
padding: `${md} ${lg}`,
justifyContent: 'space-between',
},
manage: {
fontSize: '24px',
},
actions: {
height: '50px',
},
close: {
height: '35px',
width: '35px',
},
search: {
color: '#a2a8ba',
paddingLeft: sm,
},
padding: {
padding: `0 ${md}`,
},
add: {
fontWeight: 'normal',
paddingRight: md,
paddingLeft: md,
},
list: {
overflow: 'hidden',
overflowY: 'scroll',
padding: 0,
},
token: {
minHeight: '50px',
borderBottom: `1px solid ${border}`,
},
searchInput: {
backgroundColor: 'transparent',
lineHeight: 'initial',
fontSize: mediumFontSize,
padding: 0,
'& > input::placeholder': {
letterSpacing: '-0.5px',
fontSize: mediumFontSize,
color: 'black',
},
'& > input': {
letterSpacing: '-0.5px',
},
},
searchContainer: {
width: '180px',
marginLeft: xs,
marginRight: xs,
},
searchRoot: {
letterSpacing: '-0.5px',
fontFamily: 'Roboto Mono, monospace',
fontSize: mediumFontSize,
border: 'none',
boxShadow: 'none',
},
searchIcon: {
'&:hover': {
backgroundColor: 'transparent !important',
},
},
})
type Props = Actions & { type Props = Actions & {
onClose: () => void, onClose: () => void,

View File

@ -0,0 +1,74 @@
// @flow
import { lg, md, sm, xs, mediumFontSize, border } from '~/theme/variables'
export const styles = () => ({
root: {
minHeight: '132px',
},
heading: {
padding: `${md} ${lg}`,
justifyContent: 'space-between',
},
manage: {
fontSize: '24px',
},
actions: {
height: '50px',
},
close: {
height: '35px',
width: '35px',
},
search: {
color: '#a2a8ba',
paddingLeft: sm,
},
padding: {
padding: `0 ${md}`,
},
add: {
fontWeight: 'normal',
paddingRight: md,
paddingLeft: md,
},
list: {
overflow: 'hidden',
overflowY: 'scroll',
padding: 0,
},
token: {
minHeight: '50px',
borderBottom: `1px solid ${border}`,
},
searchInput: {
backgroundColor: 'transparent',
lineHeight: 'initial',
fontSize: mediumFontSize,
padding: 0,
'& > input::placeholder': {
letterSpacing: '-0.5px',
fontSize: mediumFontSize,
color: 'black',
},
'& > input': {
letterSpacing: '-0.5px',
},
},
searchContainer: {
width: '180px',
marginLeft: xs,
marginRight: xs,
},
searchRoot: {
letterSpacing: '-0.5px',
fontFamily: 'Roboto Mono, monospace',
fontSize: mediumFontSize,
border: 'none',
boxShadow: 'none',
},
searchIcon: {
'&:hover': {
backgroundColor: 'transparent !important',
},
},
})

View File

@ -41,7 +41,7 @@ type Action = 'Token' | 'Send' | 'Receive'
class Balances extends React.Component<Props, State> { class Balances extends React.Component<Props, State> {
state = { state = {
hideZero: false, hideZero: false,
showToken: true, showToken: false,
showSend: false, showSend: false,
showReceive: false, showReceive: false,
} }