Skip to content

Commit

Permalink
Merge pull request #1907 from okta/ee/forms-content
Browse files Browse the repository at this point in the history
docs(odyssey-storybook): update Form, Fieldset content
  • Loading branch information
edburyenegren-okta authored Jul 25, 2023
2 parents 784b87c + e833f5b commit 42bc168
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ const storybookMeta: Meta = {
},
},
args: {
legend: "Ship registration information",
legend: "Docking registration",
children: (
<>
<TextField label="Name of vessel" />
<TextField isMultiline label="Nature of visit" />
<TextField label="Vessel name" />
<TextField isMultiline label="Reason for visit" />
</>
),
},
Expand Down Expand Up @@ -119,17 +119,16 @@ export const Simple: StoryObj<FieldsetProps> = {
export const Description: StoryObj<FieldsetProps> = {
...Template,
args: {
description:
"Before docking with the station, please register your ship and crew.",
description: "Register your ship before docking with the station.",
},
};

export const Alert: StoryObj<FieldsetProps> = {
...Template,
args: {
alert: (
<Infobox severity="error" role="alert" title="Something's wrong">
Something has gone horribly awry.
<Infobox severity="error" role="alert" title="Something went wrong">
Please try your request again later.
</Infobox>
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ const storybookMeta: Meta<FormProps> = {
title: "Docking registration",
children: (
<>
<TextField label="Name of vessel" />
<TextField isMultiline label="Nature of visit" />
<TextField label="Vessel name" />
<TextField isMultiline label="Reason for visit" />
</>
),
formActions: (
Expand Down Expand Up @@ -200,8 +200,8 @@ export const Simple: StoryObj<FormProps> = {
args: {
children: (
<>
<TextField label="Name of vessel" />
<TextField isMultiline label="Nature of visit" />
<TextField label="Vessel name" />
<TextField isMultiline label="Reason for visit" />
</>
),
},
Expand All @@ -213,8 +213,8 @@ export const Fieldsets: StoryObj<FormProps> = {
children: (
<>
<Fieldset legend="Vessel information" name="vessel">
<TextField label="Name of vessel" />
<TextField isMultiline label="Nature of visit" />
<TextField label="Vessel name" />
<TextField isMultiline label="Reason for visit" />
</Fieldset>
<Fieldset legend="Passenger information" name="passengers">
<TextField label="Number of passengers" />
Expand All @@ -228,17 +228,16 @@ export const Fieldsets: StoryObj<FormProps> = {
export const Description: StoryObj<FormProps> = {
...Template,
args: {
description:
"Before docking with the station, please register your ship and crew.",
description: "Register your ship before docking with the station.",
},
};

export const Alert: StoryObj<FormProps> = {
...Template,
args: {
alert: (
<Infobox severity="error" role="alert" title="Something's wrong">
Something has gone horribly awry.
<Infobox severity="error" role="alert" title="Something went wrong">
Please try your request again later.
</Infobox>
),
},
Expand All @@ -248,19 +247,19 @@ export const KitchenSink: StoryObj<FormProps> = {
...Template,
args: {
alert: (
<Infobox severity="error" role="alert" title="Something's wrong">
Something has gone horribly awry.
<Infobox severity="error" role="alert" title="Something went wrong">
Please try your request again later.
</Infobox>
),
children: (
<>
<Fieldset
legend="Vessel information"
name="vessel"
description="Taylor sat back in his chair reading the morning newspaper. The warm kitchen and the smell of coffee blended with the comfort of not having to go to work. This was his Rest Period, the first for a long time, and he was glad of it. He folded the second section back, sighing with contentment."
description="This information is used to verify vessel ownership and origin."
>
<TextField
label="Name of vessel"
label="Vessel name"
errorMessage="This field is required."
/>
<CheckboxGroup label="Systems check" isRequired>
Expand Down Expand Up @@ -306,7 +305,6 @@ export const KitchenSink: StoryObj<FormProps> = {
</Fieldset>
</>
),
description:
"Before docking with the station, please register your ship and crew.",
description: "Register your ship before docking with the station.",
},
};

0 comments on commit 42bc168

Please sign in to comment.