Clean all sizes, fonts and colors into style.js
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import style from './Modal.style'
|
||||
import Radium from 'radium'
|
||||
import { Dimmer } from 'ui'
|
||||
import { colorInfo, sizeInfo } from 'ui/style'
|
||||
|
||||
class Modal extends Component {
|
||||
static propTypes = {
|
||||
@@ -15,12 +15,19 @@ class Modal extends Component {
|
||||
width: '60%',
|
||||
}
|
||||
|
||||
static style = {
|
||||
zIndex: 101,
|
||||
background: colorInfo.modalBackground,
|
||||
borderRadius: 4,
|
||||
boxShadow: `0 0 ${sizeInfo.modalShadowWidth} ${colorInfo.modalShadow}`
|
||||
}
|
||||
|
||||
render() {
|
||||
const { open, children, width } = this.props
|
||||
|
||||
return (
|
||||
<Dimmer active={open}>
|
||||
<div style={[style.modal, { width }]}>
|
||||
<div style={[Modal.style, { width }]}>
|
||||
{children}
|
||||
</div>
|
||||
</Dimmer>
|
||||
|
||||
Reference in New Issue
Block a user