Using Paragraph's color attr in layout component
This commit is contained in:
parent
f8d73a5025
commit
0c1325627e
|
@ -10,7 +10,7 @@ type Props = {
|
||||||
noMargin?: boolean,
|
noMargin?: boolean,
|
||||||
bold?: boolean,
|
bold?: boolean,
|
||||||
size?: 'sm' | 'md' | 'lg' | 'xl',
|
size?: 'sm' | 'md' | 'lg' | 'xl',
|
||||||
color?: 'soft' | 'medium' | 'dark' | 'primary',
|
color?: 'soft' | 'medium' | 'dark' | 'primary' | 'fancy',
|
||||||
transform?: 'capitalize' | 'lowercase' | 'uppercase',
|
transform?: 'capitalize' | 'lowercase' | 'uppercase',
|
||||||
children: React$Node,
|
children: React$Node,
|
||||||
className?: string,
|
className?: string,
|
||||||
|
@ -23,7 +23,7 @@ class Paragraph extends React.PureComponent<Props> {
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
return (
|
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 }
|
{ children }
|
||||||
</p>
|
</p>
|
||||||
)
|
)
|
||||||
|
|
|
@ -19,6 +19,10 @@
|
||||||
color: #00a6c4;
|
color: #00a6c4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fancy {
|
||||||
|
color: $fancy;
|
||||||
|
}
|
||||||
|
|
||||||
.capitalize {
|
.capitalize {
|
||||||
text-transform: capitalize
|
text-transform: capitalize
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue