Skip to content

Commit

Permalink
Merge pull request #64 from Giveth/add_lead_large
Browse files Browse the repository at this point in the history
add lead large font size
  • Loading branch information
MohammadPCh authored Aug 24, 2022
2 parents 0ea8f0f + 26eff25 commit 273cb15
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
22 changes: 20 additions & 2 deletions src/components/typography/body/Lead.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
import styled from 'styled-components';

export const Lead = styled.div`
export interface ILeadProps {
size?: 'medium' | 'large';
}

const fontSize = {
medium: '20px',
large: '24px',
};

export const Lead = styled.div<ILeadProps>`
/* Body/Lead */
font-family: Red Hat Text;
font-style: normal;
font-weight: normal;
font-size: 20px;
line-height: 150%;
${props => {
switch (props.size) {
case 'medium':
return `font-size: ${fontSize.medium};`;
case 'large':
return `font-size: ${fontSize.large};`;
default:
return `font-size: ${fontSize.medium};`;
}
}}
`;
10 changes: 9 additions & 1 deletion src/stories/typography/body/Lead.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,12 @@ const Template: ComponentStory<typeof Lead> = args => (
</Lead>
);

export const Example = Template.bind({});
export const Medium = Template.bind({});
Medium.args = {
size: 'medium',
};

export const Large = Template.bind({});
Large.args = {
size: 'large',
};

0 comments on commit 273cb15

Please sign in to comment.