Improved Paragraph layout component
This commit is contained in:
parent
a044a02861
commit
d60b9a7af6
|
@ -12,17 +12,18 @@ type Props = {
|
||||||
size?: 'sm' | 'md' | 'lg' | 'xl',
|
size?: 'sm' | 'md' | 'lg' | 'xl',
|
||||||
color?: 'soft' | 'medium' | 'dark' | 'primary',
|
color?: 'soft' | 'medium' | 'dark' | 'primary',
|
||||||
transform?: 'capitalize' | 'lowercase' | 'uppercase',
|
transform?: 'capitalize' | 'lowercase' | 'uppercase',
|
||||||
children: React$Node
|
children: React$Node,
|
||||||
|
className?: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
class Paragraph extends React.PureComponent<Props> {
|
class Paragraph extends React.PureComponent<Props> {
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
bold, children, color, align, size, transform, noMargin, ...props
|
bold, children, color, align, size, transform, noMargin, className, ...props
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<p className={cx(styles.paragraph, { bold }, { noMargin }, size, transform, align)} {...props}>
|
<p className={cx(styles.paragraph, className, { bold }, { noMargin }, size, transform, align)} {...props}>
|
||||||
{ children }
|
{ children }
|
||||||
</p>
|
</p>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue