Removed Semantic UI React
This commit is contained in:
33
website/src/ui/Label.js
Normal file
33
website/src/ui/Label.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import Radium from 'radium'
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { Component } from 'react'
|
||||
import { fontInfo } from './style'
|
||||
|
||||
class Label extends Component {
|
||||
static propTypes = {
|
||||
size: PropTypes.string,
|
||||
color: PropTypes.string,
|
||||
margin: PropTypes.number,
|
||||
children: PropTypes.node
|
||||
}
|
||||
|
||||
static defaultProps = {
|
||||
size: 'medium',
|
||||
color: 'normal',
|
||||
margin: 0
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<label style={{
|
||||
display: 'inline-block',
|
||||
fontSize: fontInfo.size[this.props.size],
|
||||
color: fontInfo.color[this.props.color],
|
||||
fontFamily: fontInfo.family,
|
||||
margin: this.props.margin
|
||||
}}>{this.props.children}</label>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Radium(Label)
|
||||
Reference in New Issue
Block a user