diff --git a/packages/react/src/components/form/Fieldset/Fieldset.mdx b/packages/react/src/components/form/Fieldset/Fieldset.mdx index 3c2f6ffc2d..25d3f7d5f2 100644 --- a/packages/react/src/components/form/Fieldset/Fieldset.mdx +++ b/packages/react/src/components/form/Fieldset/Fieldset.mdx @@ -1,15 +1,16 @@ -import { Meta, ArgTypes } from '@storybook/blocks'; +import { Meta, Controls, Primary } from '@storybook/blocks'; import * as FieldsetStories from './Fieldset.stories'; + + + # Fieldset `Fieldset` er et [fieldset](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset)-element med diverse hjelpfunksjoner for å hjelpe med bruk og gruppering av kontrollelementer i et skjema. - - ## Referanser [Providing a description for groups of form controls using fieldset and legend elements](https://www.w3.org/WAI/WCAG21/Techniques/html/H71) diff --git a/packages/react/src/components/form/Fieldset/Fieldset.stories.tsx b/packages/react/src/components/form/Fieldset/Fieldset.stories.tsx index 173259bafb..557bf86e82 100644 --- a/packages/react/src/components/form/Fieldset/Fieldset.stories.tsx +++ b/packages/react/src/components/form/Fieldset/Fieldset.stories.tsx @@ -1,5 +1,8 @@ import type { Meta, StoryFn } from '@storybook/react'; +import { Textfield } from '../Textfield'; +import { Textarea } from '../Textarea'; + import { Fieldset } from '.'; type Story = StoryFn; @@ -9,4 +12,21 @@ export default { component: Fieldset, } as Meta; -export const Preview: Story = (args) =>
; +export const Preview: Story = (args) => ( +
+
+ + +
+
+); + +Preview.args = { + description: + 'Gi en kort beskrivelse i begge feltene', + disabled: false, + error: '', + legend: 'Skriv inn dine svar', + readOnly: false, + hideLegend: false, +};