From 61e5e7df8528bf75edb9b02e47e2c2256c38dea7 Mon Sep 17 00:00:00 2001 From: Ian Lovell <102812633+ianlnf@users.noreply.github.com> Date: Tue, 4 Jun 2024 16:09:47 +0100 Subject: [PATCH] fix: update letter spacing output (#40) --- .../components/document/typography/font-weight-table.tsx | 4 ++-- .../document/typography/letter-spacing-table.tsx | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/docs/src/components/document/typography/font-weight-table.tsx b/apps/docs/src/components/document/typography/font-weight-table.tsx index beb02a58b..31a9618dd 100644 --- a/apps/docs/src/components/document/typography/font-weight-table.tsx +++ b/apps/docs/src/components/document/typography/font-weight-table.tsx @@ -3,9 +3,9 @@ import { FontTable } from './font-table'; export function FontWeightTable() { return ( - + name="font-weight" - tokens={meta.light.resolved.primitive.font.size} + tokens={meta.light.resolved.primitive.font.weight} renderValue={(value) => value} renderExample={(value) => ( Sample text diff --git a/apps/docs/src/components/document/typography/letter-spacing-table.tsx b/apps/docs/src/components/document/typography/letter-spacing-table.tsx index 44d520294..eb4b0739f 100644 --- a/apps/docs/src/components/document/typography/letter-spacing-table.tsx +++ b/apps/docs/src/components/document/typography/letter-spacing-table.tsx @@ -1,14 +1,18 @@ import { meta } from '@govie-ds/theme-govie'; import { FontTable } from './font-table'; +function remToEm(value: string) { + return value.replace('rem', 'em'); +} + export function LetterSpacingTable() { return ( name="letter-spacing" tokens={meta.light.resolved.primitive.font.letterSpacing} - renderValue={(value) => value} + renderValue={(value) => remToEm(value)} renderExample={(value) => ( - Sample text + Sample text )} /> );