Skip to content
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
1 change: 1 addition & 0 deletions frontend/common/theme/tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
"heading-lg": { "cssVar": "--font-size-heading-lg", "value": "24px", "description": "Level 1 headings. Page titles." },
"heading-md": { "cssVar": "--font-size-heading-md", "value": "18px", "description": "Level 2 headings. Sections." },
"heading-sm": { "cssVar": "--font-size-heading-sm", "value": "16px", "description": "Level 3 to 6 headings. Cards, subsections." },
"body-lg": { "cssVar": "--font-size-body-lg", "value": "16px", "description": "Large body text. Touch-sized rows on phones." },
"body-md": { "cssVar": "--font-size-body-md", "value": "14px", "description": "Default body text." },
"body-sm": { "cssVar": "--font-size-body-sm", "value": "13px", "description": "Small body text. Secondary details." },
"body-xs": { "cssVar": "--font-size-body-xs", "value": "12px", "description": "Extra small body text. Captions, labels." }
Expand Down
5 changes: 5 additions & 0 deletions frontend/common/theme/tokens.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions frontend/documentation/TokenReference.generated.stories.tsx

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion frontend/documentation/components/BodyText.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const meta: Meta<typeof BodyText> = {
docs: {
description: {
component:
'Body text, a `<p>` by default and a `<span>` with `inline`. The default is 14px regular; `size` is `sm` (13px) or `xs` (12px) and `weight` is `semibold`. `muted` uses the secondary text colour. Other colours come from the `text-*` utilities.',
'Body text, a `<p>` by default and a `<span>` with `inline`. The default is 14px regular; `size` is `lg` (16px), `sm` (13px) or `xs` (12px) and `weight` is `semibold`. `muted` uses the secondary text colour. Other colours come from the `text-*` utilities.',
},
},
},
Expand All @@ -23,6 +23,10 @@ type Story = StoryObj<typeof BodyText>

export const Default: Story = {}

export const Large: Story = {
args: { size: 'lg' },
}

export const Small: Story = {
args: { size: 'sm' },
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
font-weight: var(--font-weight-regular);
line-height: var(--line-height-body);

&--lg {
font-size: var(--font-size-body-lg);
}
&--sm {
font-size: var(--font-size-body-sm);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { FC, HTMLAttributes } from 'react'
import cn from 'classnames'
import './BodyText.scss'

export type BodyTextSize = 'sm' | 'xs'
export type BodyTextSize = 'lg' | 'sm' | 'xs'
export type BodyTextWeight = 'semibold'

export type BodyTextProps = HTMLAttributes<HTMLElement> & {
Expand Down
1 change: 1 addition & 0 deletions frontend/web/styles/_tokens.scss

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading