wingsuit-designsystem / wingsuit

Twig for Storybook
GNU General Public License v2.0
91 stars 16 forks source link

Typography Docs not rendering Typeface #137

Closed danleecpi closed 3 years ago

danleecpi commented 3 years ago

Describe the bug I noticed in the typography docs page that the fonts are not loaded after install.

To Reproduce Steps to reproduce the behaviour:

  1. Install wingsuit and run storybook
  2. Browse to Typography Docs and you will see the error. The screenshot below shows my own typeface which I have added... this wasn't working with Poppins font either on a fresh install.

Font rendering in components is working without issue.

Screenshot 2021-04-04 at 09 58 00
christianwiedemann commented 3 years ago

Hi! The typography is an mdx file. You can find it under apps/storybook/00-base/typeset.stories.mdx.

You can fix this by changing line 25 from

<Typeset fontFamily={key} classNamePrefix="text-" fontSizes={fontSizes} /> to

<Typeset fontFamily={fontFamilies[key][0]} classNamePrefix="text-" fontSizes={fontSizes} />

I fixed it in the startkit.

Thanks for reporting!

danleecpi commented 3 years ago

Thanks for the fix @christianwiedemann!