Fixed message dialog
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user