Adding dot style in Paragraph component

This commit is contained in:
apanizo 2018-09-13 17:08:04 +02:00
parent 431e0281a4
commit e64da52fa1
2 changed files with 8 additions and 3 deletions

View File

@ -13,18 +13,19 @@ type Props = {
color?: 'soft' | 'medium' | 'dark' | 'white' | 'fancy' | 'primary' | 'warning', color?: 'soft' | 'medium' | 'dark' | 'white' | 'fancy' | 'primary' | 'warning',
transform?: 'capitalize' | 'lowercase' | 'uppercase', transform?: 'capitalize' | 'lowercase' | 'uppercase',
children: React$Node, children: React$Node,
dot?: boolean,
className?: string, className?: string,
} }
class Paragraph extends React.PureComponent<Props> { class Paragraph extends React.PureComponent<Props> {
render() { render() {
const { const {
weight, children, color, align, size, transform, noMargin, className, ...props weight, children, color, align, size, transform, noMargin, className, dot, ...props
} = this.props } = this.props
return ( return (
<p <p
className={cx(styles.paragraph, className, weight, { noMargin }, size, color, transform, align)} className={cx(styles.paragraph, className, weight, { noMargin }, { dot }, size, color, transform, align)}
{...props} {...props}
> >
{ children } { children }

View File

@ -88,4 +88,8 @@
.bold { .bold {
font-weight: $boldFont; font-weight: $boldFont;
} }
.dot {
display: list-item;
}