Skip to content

Commit

Permalink
Merge pull request #221 from WestpacGEL/fix-194-add-font-docs
Browse files Browse the repository at this point in the history
Fix #194 add font weight documentation
  • Loading branch information
samithaf authored Oct 31, 2023
2 parents 70786ea + 714999f commit a87cd20
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions packages/ui/src/stories/foundation/typography.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,39 @@ export const LineHeight = () => {
</div>
);
};

/**
* Fonts weight
*/
export const FontWeight = () => {
const fontWeight = [
{ className: 'font-light', weight: '300' },
{ className: 'font-normal', weight: '400' },
{ className: 'font-medium', weight: '500' },
{ className: 'font-semibold', weight: '600' },
{ className: 'font-bold', weight: '700' },
];
return (
<Table>
<Table.Caption>Font Weight</Table.Caption>
<Table.Header>
<Table.HeaderRow>
<Table.HeaderCell>Token</Table.HeaderCell>
<Table.HeaderCell>Font weight</Table.HeaderCell>
<Table.HeaderCell>Tailwind class</Table.HeaderCell>
</Table.HeaderRow>
</Table.Header>
<Table.Body>
{fontWeight.map(i => (
<Table.Row key={i.className}>
<Table.Cell>
<span className={i.className}>{i.className.replace('font-', '')}</span>
</Table.Cell>
<Table.Cell className={i.className}>{i.weight}</Table.Cell>
<Table.Cell>{i.className}</Table.Cell>
</Table.Row>
))}
</Table.Body>
</Table>
);
};

1 comment on commit a87cd20

@vercel
Copy link

@vercel vercel bot commented on a87cd20 Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

gel-next-site – ./apps/site

gel-next-site.vercel.app
gel-next-site-git-main-westpacgel.vercel.app
gel-next-site-westpacgel.vercel.app

Please sign in to comment.