Skip to content

Commit 26eff25

Browse files
committed
fix: add lead large font size
1 parent 0ea8f0f commit 26eff25

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed
Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
import styled from 'styled-components';
22

3-
export const Lead = styled.div`
3+
export interface ILeadProps {
4+
size?: 'medium' | 'large';
5+
}
6+
7+
const fontSize = {
8+
medium: '20px',
9+
large: '24px',
10+
};
11+
12+
export const Lead = styled.div<ILeadProps>`
413
/* Body/Lead */
514
font-family: Red Hat Text;
615
font-style: normal;
716
font-weight: normal;
8-
font-size: 20px;
917
line-height: 150%;
18+
${props => {
19+
switch (props.size) {
20+
case 'medium':
21+
return `font-size: ${fontSize.medium};`;
22+
case 'large':
23+
return `font-size: ${fontSize.large};`;
24+
default:
25+
return `font-size: ${fontSize.medium};`;
26+
}
27+
}}
1028
`;

src/stories/typography/body/Lead.stories.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,12 @@ const Template: ComponentStory<typeof Lead> = args => (
1313
</Lead>
1414
);
1515

16-
export const Example = Template.bind({});
16+
export const Medium = Template.bind({});
17+
Medium.args = {
18+
size: 'medium',
19+
};
20+
21+
export const Large = Template.bind({});
22+
Large.args = {
23+
size: 'large',
24+
};

0 commit comments

Comments
 (0)