mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-17 01:59:08 +00:00
feat(design-system): port most of ui atoms to bazel monorepo and new storybook
This commit is contained in:
parent
a5e2fdc7a7
commit
72ea639c5d
108 changed files with 13650 additions and 53 deletions
30
src/design-system/atoms/fonts/fonts.tsx
Normal file
30
src/design-system/atoms/fonts/fonts.tsx
Normal file
|
@ -0,0 +1,30 @@
|
|||
import * as React from "react";
|
||||
import Head from "next/head";
|
||||
import styled, { css } from "styled-components";
|
||||
import * as _ from "styled-components"; // tslint:disable-line:no-duplicate-imports
|
||||
|
||||
export const InjectTypekitFont = () => {
|
||||
React.useEffect(() => {
|
||||
(window as any).Typekit.load();
|
||||
}, []);
|
||||
return (
|
||||
<Head>
|
||||
<link
|
||||
key="typekit-css-preload"
|
||||
rel="preload"
|
||||
href="https://use.typekit.net/bck0pci.js"
|
||||
as="script"
|
||||
/>
|
||||
<script key="typekit-js" src="https://use.typekit.net/bck0pci.js" />
|
||||
</Head>
|
||||
);
|
||||
};
|
||||
|
||||
export const fontCSS = css`
|
||||
font-family: "source-han-sans-japanese", "Source Sans Pro", sans-serif,
|
||||
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;
|
||||
`;
|
||||
|
||||
export const UseFontStyled = styled.div`
|
||||
${fontCSS}
|
||||
`;
|
Loading…
Add table
Add a link
Reference in a new issue