Skip to content

Commit cff0050

Browse files
authored
feat(plex): adding optional weights for non-latin dynamic loader (#6909)
### Related Ticket(s) No related issue ### Description This introduces the option to only load in specific weights when using the non-Latin plex dynamic loading utility. An example: ``` import { loadNonLatinPlex } from '@carbon/ibmdotcom-utilities'; loadNonLatinPlex('ar', [400,600]); ``` Will add the following to the `<head>`: ``` <link href="https://1.www.s81c.com/common/carbon/plex/sans-arabic-regular.css" type="text/css" rel="stylesheet" media="screen,print"> <link href="https://1.www.s81c.com/common/carbon/plex/sans-arabic-semibold.css" type="text/css" rel="stylesheet" media="screen,print"> ``` If nothing is passed, it will load in all 100-700 weights (existing functionality today): ``` <link href="https://1.www.s81c.com/common/carbon/plex/sans-arabic.css" type="text/css" rel="stylesheet" media="screen,print"> ``` ### Changelog **New** - Adding `weights` option to `loadNonLatinPlex` utility
1 parent 4138e4a commit cff0050

File tree

3 files changed

+210
-153
lines changed

3 files changed

+210
-153
lines changed

0 commit comments

Comments
 (0)