Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(playroom/storybook): add On Air font #850

Merged
merged 8 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .storybook/css/fonts/OnAir-Bold.woff2
Binary file not shown.
Binary file added .storybook/css/fonts/OnAir-Light.woff2
Binary file not shown.
Binary file added .storybook/css/fonts/OnAir-Medium.woff2
Binary file not shown.
Binary file added .storybook/css/fonts/OnAir-Regular.woff2
Binary file not shown.
31 changes: 31 additions & 0 deletions .storybook/css/onair-font.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Regular */
@font-face {
font-family: 'On Air';
font-style: normal;
font-weight: 400;
src: url('./fonts/OnAir-Regular.woff2') format('woff2');
}

/* Light */
@font-face {
font-family: 'On Air';
font-style: normal;
font-weight: 300;
src: url('./fonts/OnAir-Light.woff2') format('woff2');
}

/* Medium */
@font-face {
font-family: 'On Air';
font-style: normal;
font-weight: 500;
src: url('./fonts/OnAir-Medium.woff2') format('woff2');
}

/* Bold */
@font-face {
font-family: 'On Air';
font-style: normal;
font-weight: 700;
src: url('./fonts/OnAir-Bold.woff2') format('woff2');
}
2 changes: 2 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import './css/roboto.css';
import './css/vivo-font.css';
import './css/telefonica-font.css';
import './css/onair-font.css';
import './css/main.css';
import * as React from 'react';
import {
Expand Down Expand Up @@ -72,6 +73,7 @@ const MisticaThemeProvider = ({Story, context}): React.ReactElement => {
<ThemeContextProvider theme={getTheme(skin as string, platform, colorScheme)}>
{skin === VIVO_NEW_SKIN && <style>{`body {font-family: "Vivo Type"}`}</style>}
{skin === TELEFONICA_SKIN && <style>{`body {font-family: "Telefonica Sans"}`}</style>}
{skin === O2_SKIN && <style>{`body {font-family: "On Air"}`}</style>}
<Story {...context} />
</ThemeContextProvider>
);
Expand Down
Binary file added .yarn/cache/fsevents-patch-2882183fbf-8.zip
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-61ccaa93a2-8.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion playroom.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const config = {
],
},
{
test: /(reset|roboto|vivo-font|telefonica-font)\.css$/,
test: /(reset|roboto|vivo-font|telefonica-font|onair-font)\.css$/,
use: ['style-loader', 'css-loader'],
},
{
Expand Down
3 changes: 3 additions & 0 deletions playroom/frame-component.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import '../css/roboto.css';
import '../.storybook/css/vivo-font.css';
import '../.storybook/css/telefonica-font.css';
import '../.storybook/css/onair-font.css';
import '../css/reset.css';
import * as React from 'react';
import {
Expand All @@ -10,6 +11,7 @@ import {
skinVars,
VIVO_NEW_SKIN,
TELEFONICA_SKIN,
O2_SKIN,
} from '../src';

import type {ThemeConfig} from '../src';
Expand Down Expand Up @@ -39,6 +41,7 @@ const App = ({children, skinName}: {children: React.ReactNode; skinName: string}

${skinName === VIVO_NEW_SKIN ? 'body {font-family: "Vivo Type"}' : ''}
${skinName === TELEFONICA_SKIN ? 'body {font-family: "Telefonica Sans"}' : ''}
${skinName === O2_SKIN ? 'body {font-family: "On Air"}' : ''}

${isModalOpen ? 'body {overflow-y: hidden}' : ''}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading