Skip to content

Commit

Permalink
fix: add space for storybook examples (#1423)
Browse files Browse the repository at this point in the history
Gives space to the customError storybook examples so the tooltip won't
be cut off.
  • Loading branch information
BoppLi authored Jun 26, 2024
1 parent 688ac31 commit aa624a5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
15 changes: 3 additions & 12 deletions apps/alpha-test-app/src/components/form-demo/FormDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,9 @@ export type FormData = Partial<{
const formState = defineModel<FormData>();
const selectOptions = [
{
value: "apple",
label: "Apple",
},
{
value: "banana",
label: "Banana",
},
{
value: "strawberry",
label: "Strawberry",
},
{ value: "apple", label: "Apple" },
{ value: "banana", label: "Banana" },
{ value: "strawberry", label: "Strawberry" },
];
const customErrorExample = ref("");
Expand Down
10 changes: 8 additions & 2 deletions packages/sit-onyx/src/components/OnyxInput/OnyxInput.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const HiddenLabel = {
* This example shows an input with a custom error message.
* Will only be shown after user interaction.
*/
export const CustomError = {
export const CustomError: Story = {
args: {
...Default.args,
customError: {
Expand All @@ -162,7 +162,13 @@ export const CustomError = {
},
placeholder: "Interact with me to show error",
},
} satisfies Story;
decorators: [
(story) => ({
components: { story },
template: `<div style="padding-bottom: 2rem"> <story /> </div>`,
}),
],
};

/**
* This example shows an input with info label tooltip.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const HiddenLabel = {
* This example shows a textarea with a custom error message.
* Will only be shown after user interaction.
*/
export const CustomError = {
export const CustomError: Story = {
args: {
...Default.args,
customError: {
Expand All @@ -125,7 +125,13 @@ export const CustomError = {
},
placeholder: "Interact with me to show error",
},
} satisfies Story;
decorators: [
(story) => ({
components: { story },
template: `<div style="padding-bottom: 2rem"> <story /> </div>`,
}),
],
};

/**
* This example shows a textarea with custom autosize settings (min=2 rows, max=12 rows).
Expand Down

0 comments on commit aa624a5

Please sign in to comment.