Skip to content

Commit

Permalink
Fix multiline examples (#3739)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding authored Jul 9, 2024
1 parent 9d6919d commit 5408d88
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 22 deletions.
20 changes: 15 additions & 5 deletions packages/core/stories/checkbox/checkbox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ export const WithDescription: StoryFn<typeof Checkbox> = () => {
label={
<StackLayout gap={0.5} align="start">
<Text>Bonds</Text>
<Text color="secondary">Debt securities</Text>
<Text color="secondary" styleAs="label">
Debt securities
</Text>
</StackLayout>
}
/>
Expand Down Expand Up @@ -191,7 +193,9 @@ const GroupWithDescriptions: StoryFn<typeof CheckboxGroup> = (args) => {
label={
<StackLayout gap={0.5} align="start">
<Text>Alternatives</Text>
<Text color="secondary">Other investments</Text>
<Text color="secondary" styleAs="label">
Other investments
</Text>
</StackLayout>
}
/>
Expand All @@ -200,7 +204,9 @@ const GroupWithDescriptions: StoryFn<typeof CheckboxGroup> = (args) => {
label={
<StackLayout gap={0.5} align="start">
<Text>Equities</Text>
<Text color="secondary">Company shares</Text>
<Text color="secondary" styleAs="label">
Company shares
</Text>
</StackLayout>
}
/>
Expand All @@ -209,7 +215,9 @@ const GroupWithDescriptions: StoryFn<typeof CheckboxGroup> = (args) => {
label={
<StackLayout gap={0.5} align="start">
<Text>Fixed income</Text>
<Text color="secondary">Interest-paying</Text>
<Text color="secondary" styleAs="label">
Interest-paying
</Text>
</StackLayout>
}
/>
Expand All @@ -218,7 +226,9 @@ const GroupWithDescriptions: StoryFn<typeof CheckboxGroup> = (args) => {
label={
<StackLayout gap={0.5} align="start">
<Text>Bonds</Text>
<Text color="secondary">Debt securities</Text>
<Text color="secondary" styleAs="label">
Debt securities
</Text>
</StackLayout>
}
/>
Expand Down
4 changes: 1 addition & 3 deletions packages/core/stories/list-box/list-box.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ export const ComplexOptions = (): ReactElement => {
{shortColorWithHex.slice(0, 5).map(({ color, hex }) => (
<Option value={color} key={color}>
<StackLayout gap={0.5} align="start">
<Text>
<strong>{color}</strong>
</Text>
<Text>{color}</Text>
<Text styleAs="label" color="secondary">
{hex}
</Text>
Expand Down
16 changes: 12 additions & 4 deletions packages/core/stories/radio-button/radio-button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export const WithDescription = () => {
label={
<StackLayout gap={0.5} align="start">
<Text>Bonds</Text>
<Text color="secondary">Debt securities</Text>
<Text color="secondary" styleAs="label">
Debt securities
</Text>
</StackLayout>
}
/>
Expand Down Expand Up @@ -93,7 +95,9 @@ const GroupWithDescriptions: StoryFn<typeof RadioButtonGroup> = (args) => (
label={
<StackLayout gap={0.5} align="start">
<Text>NAMR</Text>
<Text color="secondary">North America</Text>
<Text color="secondary" styleAs="label">
North America
</Text>
</StackLayout>
}
/>
Expand All @@ -102,7 +106,9 @@ const GroupWithDescriptions: StoryFn<typeof RadioButtonGroup> = (args) => (
label={
<StackLayout gap={0.5} align="start">
<Text>APAC</Text>
<Text color="secondary">Asia–Pacific</Text>
<Text color="secondary" styleAs="label">
Asia–Pacific
</Text>
</StackLayout>
}
/>
Expand All @@ -111,7 +117,9 @@ const GroupWithDescriptions: StoryFn<typeof RadioButtonGroup> = (args) => (
label={
<StackLayout gap={0.5} align="start">
<Text>EMEA</Text>
<Text color="secondary">Europe, Middle East, and Africa</Text>
<Text color="secondary" styleAs="label">
Europe, Middle East, and Africa
</Text>
</StackLayout>
}
/>
Expand Down
16 changes: 12 additions & 4 deletions site/src/examples/checkbox/WithDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export const WithDescription = (): ReactElement => {
label={
<StackLayout gap={0.5} align="start">
<Text>Alternatives</Text>
<Text color="secondary">Other investments</Text>
<Text color="secondary" styleAs="label">
Other investments
</Text>
</StackLayout>
}
/>
Expand All @@ -18,7 +20,9 @@ export const WithDescription = (): ReactElement => {
label={
<StackLayout gap={0.5} align="start">
<Text>Equities</Text>
<Text color="secondary">Company shares</Text>
<Text color="secondary" styleAs="label">
Company shares
</Text>
</StackLayout>
}
/>
Expand All @@ -27,7 +31,9 @@ export const WithDescription = (): ReactElement => {
label={
<StackLayout gap={0.5} align="start">
<Text>Fixed income</Text>
<Text color="secondary">Interest-paying</Text>
<Text color="secondary" styleAs="label">
Interest-paying
</Text>
</StackLayout>
}
/>
Expand All @@ -36,7 +42,9 @@ export const WithDescription = (): ReactElement => {
label={
<StackLayout gap={0.5} align="start">
<Text>Bonds</Text>
<Text color="secondary">Debt securities</Text>
<Text color="secondary" styleAs="label">
Debt securities
</Text>
</StackLayout>
}
/>
Expand Down
4 changes: 1 addition & 3 deletions site/src/examples/list-box/ComplexOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ export const ComplexOptions = (): ReactElement => {
{shortColorWithHex.slice(0, 5).map(({ color, hex }) => (
<Option value={color} key={color}>
<StackLayout gap={0.5} align="start">
<Text>
<strong>{color}</strong>
</Text>
<Text>{color}</Text>
<Text styleAs="label" color="secondary">
{hex}
</Text>
Expand Down
12 changes: 9 additions & 3 deletions site/src/examples/radio-button/WithDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ export const WithDescription = (): ReactElement => {
label={
<StackLayout gap={0.5} align="start">
<Text>NAMR</Text>
<Text color="secondary">North America</Text>
<Text color="secondary" styleAs="label">
North America
</Text>
</StackLayout>
}
/>
Expand All @@ -23,7 +25,9 @@ export const WithDescription = (): ReactElement => {
label={
<StackLayout gap={0.5} align="start">
<Text>APAC</Text>
<Text color="secondary">Asia–Pacific</Text>
<Text color="secondary" styleAs="label">
Asia–Pacific
</Text>
</StackLayout>
}
/>
Expand All @@ -32,7 +36,9 @@ export const WithDescription = (): ReactElement => {
label={
<StackLayout gap={0.5} align="start">
<Text>EMEA</Text>
<Text color="secondary">Europe, Middle East, and Africa</Text>
<Text color="secondary" styleAs="label">
Europe, Middle East, and Africa
</Text>
</StackLayout>
}
/>
Expand Down

0 comments on commit 5408d88

Please sign in to comment.