From 72ad2e4a3991a9e87ef749d01fc4dbd849f933e2 Mon Sep 17 00:00:00 2001 From: James Mockett <1166188+jamesmockett@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:18:14 +0100 Subject: [PATCH] Replace typography API instances in dev kitchen --- .../src/react-components/file-input/styles.ts | 7 +++---- .../src/react-components/toggle-switch/styles.ts | 10 ++++++++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/libs/@guardian/source-development-kitchen/src/react-components/file-input/styles.ts b/libs/@guardian/source-development-kitchen/src/react-components/file-input/styles.ts index 2fcb16a6b..fd0f7ee51 100644 --- a/libs/@guardian/source-development-kitchen/src/react-components/file-input/styles.ts +++ b/libs/@guardian/source-development-kitchen/src/react-components/file-input/styles.ts @@ -2,7 +2,6 @@ import { css } from '@emotion/react'; import type { SerializedStyles } from '@emotion/react'; import { focusHalo, - fontWeights, height, remHeight, remSpace, @@ -23,19 +22,19 @@ export const fileName = ( const defaultUpload = css` padding: ${remSpace[3]}; border-radius: ${height.ctaMedium}px; - font-weight: ${fontWeights.bold}; + font-weight: 700; `; const smallUpload = css` padding: ${remSpace[3]}; border-radius: ${height.ctaSmall}px; - font-weight: ${fontWeights.bold}; + font-weight: 700; `; const xsmallUpload = css` padding: 0 ${space[3]}px; padding: ${remSpace[3]}; border-radius: ${height.ctaXsmall}px; - font-weight: ${fontWeights.bold}; + font-weight: 700; `; export const warningText = ( diff --git a/libs/@guardian/source-development-kitchen/src/react-components/toggle-switch/styles.ts b/libs/@guardian/source-development-kitchen/src/react-components/toggle-switch/styles.ts index f6b585f7a..08d995fa9 100644 --- a/libs/@guardian/source-development-kitchen/src/react-components/toggle-switch/styles.ts +++ b/libs/@guardian/source-development-kitchen/src/react-components/toggle-switch/styles.ts @@ -6,7 +6,10 @@ import { neutral, space, success, - textSans, + textSans15, + textSans17, + textSansBold15, + textSansBold17, } from '@guardian/source/foundations'; import type { LabelPosition, @@ -140,7 +143,10 @@ export const labelStyles = ( fontWeight: ToggleSwitchFontWeight, format?: ArticleFormat, ): SerializedStyles => css` - ${textSans[fontSize]({ fontWeight })}; + ${fontSize === 'small' && + (fontWeight === 'regular' ? textSans15 : textSansBold15)}; + ${fontSize === 'medium' && + (fontWeight === 'regular' ? textSans17 : textSansBold17)}; color: ${format ? neutral[100] : neutral[7]}; display: inline-flex; justify-content: space-between;