Using Paragraph's color attr in layout component

This commit is contained in:
apanizo 2018-09-04 17:11:49 +02:00
parent f8d73a5025
commit 0c1325627e
2 changed files with 6 additions and 2 deletions

View File

@ -10,7 +10,7 @@ type Props = {
noMargin?: boolean,
bold?: boolean,
size?: 'sm' | 'md' | 'lg' | 'xl',
color?: 'soft' | 'medium' | 'dark' | 'primary',
color?: 'soft' | 'medium' | 'dark' | 'primary' | 'fancy',
transform?: 'capitalize' | 'lowercase' | 'uppercase',
children: React$Node,
className?: string,
@ -23,7 +23,7 @@ class Paragraph extends React.PureComponent<Props> {
} = this.props
return (
<p className={cx(styles.paragraph, className, { bold }, { noMargin }, size, transform, align)} {...props}>
<p className={cx(styles.paragraph, className, { bold }, { noMargin }, size, color, transform, align)} {...props}>
{ children }
</p>
)

View File

@ -19,6 +19,10 @@
color: #00a6c4;
}
.fancy {
color: $fancy;
}
.capitalize {
text-transform: capitalize
}