Repository URL to install this package:
|
Version:
0.14.1 ▾
|
import React from 'react'
import { LabelElement } from './styled'
import { DefaultProps, DefaultStates } from '../typings'
// @todo !!! content is the wrong prop name
// extending interface from Label component
export interface LabelProps extends DefaultProps {
text?: string
children?: React.ReactNode
}
class Label extends React.PureComponent<LabelProps> {
static defaultProps = {
// text: 'Hey, I am Label!',
}
render() {
const { text, content, children, ...remainingProps } = this.props
return (
<LabelElement {...remainingProps}>
{children || text || content}
</LabelElement>
)
}
}
export { Label }
export default Label