Normalizing weight fonts to 300, 400 and 700

This commit is contained in:
apanizo 2018-09-05 11:34:36 +02:00
parent b97a722068
commit ac84770605
5 changed files with 26 additions and 12 deletions

View File

@ -13,17 +13,19 @@
.h2 { .h2 {
line-height: 28px; line-height: 28px;
font-size: $largeFontSize; font-size: $(fontSizeHeadingMd)px;
} }
.h3 { .h3 {
line-height: 21px; line-height: 21px;
font-size: $mediumFontSize;
font-weight: bold; font-weight: bold;
font-family: 'Roboto Mono', monospace; font-family: 'Roboto Mono', monospace;
font-size: $(fontSizeHeadingSm)px;
} }
.h4 { .h4 {
line-height: 21px;
font-family: 'Roboto Mono', monospace;
font-size: $(fontSizeHeadingXs)px; font-size: $(fontSizeHeadingXs)px;
} }

View File

@ -8,7 +8,7 @@ const cx = classNames.bind(styles)
type Props = { type Props = {
align?: 'right' | 'center' | 'left', align?: 'right' | 'center' | 'left',
noMargin?: boolean, noMargin?: boolean,
bold?: boolean, weight?: 'light' | 'regular' | 'bold',
size?: 'sm' | 'md' | 'lg' | 'xl', size?: 'sm' | 'md' | 'lg' | 'xl',
color?: 'soft' | 'medium' | 'dark' | 'primary' | 'fancy', color?: 'soft' | 'medium' | 'dark' | 'primary' | 'fancy',
transform?: 'capitalize' | 'lowercase' | 'uppercase', transform?: 'capitalize' | 'lowercase' | 'uppercase',
@ -19,11 +19,14 @@ type Props = {
class Paragraph extends React.PureComponent<Props> { class Paragraph extends React.PureComponent<Props> {
render() { render() {
const { const {
bold, children, color, align, size, transform, noMargin, className, ...props weight, children, color, align, size, transform, noMargin, className, ...props
} = this.props } = this.props
return ( return (
<p className={cx(styles.paragraph, className, { bold }, { noMargin }, size, color, transform, align)} {...props}> <p
className={cx(styles.paragraph, className, weight, { noMargin }, size, color, transform, align)}
{...props}
>
{ children } { children }
</p> </p>
) )

View File

@ -63,10 +63,18 @@
font-size: $largeFontSize; font-size: $largeFontSize;
} }
.lg { .xl {
font-size: $extraLargeFontSize; font-size: $extraLargeFontSize;
} }
.light {
font-weight: $lightFont;
}
.regular {
font-weight: $regularFont;
}
.bold { .bold {
font-weight: bold; font-weight: $boldFont;
} }

View File

@ -54,7 +54,7 @@ const Owners = (props: Props) => {
<Row key={`owner${(index)}`}> <Row key={`owner${(index)}`}>
<Col xs={11} xsOffset={1}> <Col xs={11} xsOffset={1}>
<Block margin="sm"> <Block margin="sm">
<Paragraph bold>Owner {index + 1}</Paragraph> <Paragraph Weight="bold">Owner {index + 1}</Paragraph>
<Block margin="sm"> <Block margin="sm">
<Field <Field
name={getOwnerNameBy(index)} name={getOwnerNameBy(index)}

View File

@ -25,15 +25,16 @@ module.exports = Object.assign({}, {
lg, lg,
xl, xl,
border, border,
fontSizeHeadingXs: 16, fontSizeHeadingXs: 13,
fontSizeHeadingSm: 18, fontSizeHeadingSm: 18,
fontSizeHeadingMd: 21, fontSizeHeadingMd: 21,
fontSizeHeadingLg: 32, fontSizeHeadingLg: 32,
regularFontWeight: 400, lightFont: 300,
boldFontWeight: 700, regularFont: 400,
boldFont: 700,
smallFontSize: '11px', smallFontSize: '11px',
mediumFontSize: '13px', mediumFontSize: '13px',
largeFontSize: '18px', largeFontSize: '15px',
extraLargeFontSize: '24px', extraLargeFontSize: '24px',
screenXs: 480, screenXs: 480,
screenXsMax: 767, screenXsMax: 767,