diff --git a/govtool/frontend/src/stories/Input.stories.tsx b/govtool/frontend/src/stories/Input.stories.tsx index 95a134c60..e863f036b 100644 --- a/govtool/frontend/src/stories/Input.stories.tsx +++ b/govtool/frontend/src/stories/Input.stories.tsx @@ -65,3 +65,10 @@ export const WithHelpfulText = Template.bind({}); WithHelpfulText.args = { helpfulText: "Helpful text", }; + +export const WithAllProps = Template.bind({}); +WithAllProps.args = { + label: "Label", + helpfulText: "Helpful text", + errorMessage: "Error message", +}; diff --git a/govtool/frontend/src/stories/TextArea.stories.tsx b/govtool/frontend/src/stories/TextArea.stories.tsx index 8f6cc178b..c378c6749 100644 --- a/govtool/frontend/src/stories/TextArea.stories.tsx +++ b/govtool/frontend/src/stories/TextArea.stories.tsx @@ -40,3 +40,10 @@ ErrorAndLabel.args = { errorMessage: "Error message", label: "Label", }; + +export const WithAllProps = Template.bind({}); +WithAllProps.args = { + label: "Label", + helpfulText: "Helpful text", + errorMessage: "Error message", +}; diff --git a/govtool/frontend/src/stories/modals/ExternalLinkModal.stories.tsx b/govtool/frontend/src/stories/modals/ExternalLinkModal.stories.tsx index 236943ac5..05ac4c018 100644 --- a/govtool/frontend/src/stories/modals/ExternalLinkModal.stories.tsx +++ b/govtool/frontend/src/stories/modals/ExternalLinkModal.stories.tsx @@ -37,13 +37,9 @@ const Template: StoryFn = (args) => { {modals[modal.type]?.component && ( - openModal({ type: "none", state: null }) - ) - : undefined - } + handleClose={callAll(modals[modal.type]?.onClose, () => + openModal({ type: "none", state: null }) + )} > {modals[modal.type]?.component ?? <>} diff --git a/govtool/frontend/src/stories/modals/StatusModal.stories.tsx b/govtool/frontend/src/stories/modals/StatusModal.stories.tsx index d7c0b56ce..c8474d741 100644 --- a/govtool/frontend/src/stories/modals/StatusModal.stories.tsx +++ b/govtool/frontend/src/stories/modals/StatusModal.stories.tsx @@ -64,13 +64,9 @@ const Template: StoryFn = (args) => { {modals[modal.type]?.component && ( - openModal({ type: "none", state: null }) - ) - : undefined - } + handleClose={callAll(modals[modal.type]?.onClose, () => + openModal({ type: "none", state: null }) + )} > {modals[modal.type]?.component ?? <>} diff --git a/govtool/frontend/src/stories/modals/StatusWithLink.stories.tsx b/govtool/frontend/src/stories/modals/StatusWithLink.stories.tsx index 1181fb143..8c8ca391b 100644 --- a/govtool/frontend/src/stories/modals/StatusWithLink.stories.tsx +++ b/govtool/frontend/src/stories/modals/StatusWithLink.stories.tsx @@ -45,13 +45,9 @@ const Template: StoryFn = (args) => { {modals[modal.type]?.component && ( - openModal({ type: "none", state: null }) - ) - : undefined - } + handleClose={callAll(modals[modal.type]?.onClose, () => + openModal({ type: "none", state: null }) + )} > {modals[modal.type]?.component ?? <>} diff --git a/govtool/frontend/src/stories/modals/VotingPowerModal.stories.tsx b/govtool/frontend/src/stories/modals/VotingPowerModal.stories.tsx index 5820c9bb3..fbca8d633 100644 --- a/govtool/frontend/src/stories/modals/VotingPowerModal.stories.tsx +++ b/govtool/frontend/src/stories/modals/VotingPowerModal.stories.tsx @@ -32,13 +32,9 @@ const Template: StoryFn = (args) => { {modals[modal.type]?.component && ( - openModal({ type: "none", state: null }) - ) - : undefined - } + handleClose={callAll(modals[modal.type]?.onClose, () => + openModal({ type: "none", state: null }) + )} > {modals[modal.type]?.component ?? <>}