Fixed message dialog

This commit is contained in:
John Lyon-Smith
2018-02-28 10:53:32 -08:00
parent 4ce0638655
commit c2eeccb66f
16 changed files with 101 additions and 52 deletions

View File

@@ -8,23 +8,30 @@ class Text extends Component {
size: PropTypes.string,
margin: PropTypes.number,
children: PropTypes.node,
tone: PropTypes.string
tone: PropTypes.string,
width: PropTypes.oneOfType([ PropTypes.string, PropTypes.number ]),
align: PropTypes.string,
}
static defaultProps = {
size: 'medium',
tone: 'normal',
margin: 0
margin: 0,
align: 'left',
}
render() {
const { margin, width, align } = this.props
return (
<span style={{
display: 'inline-block',
fontSize: fontInfo.size[this.props.size],
fontFamily: fontInfo.family,
margin: this.props.margin,
color: fontInfo.color[this.props.tone],
textAlign: align,
margin,
width,
}}>{this.props.children}</span>
)
}