Skip to content

Commit

Permalink
[#453] Fixes after CR
Browse files Browse the repository at this point in the history
  • Loading branch information
JanJaroszczak committed Mar 13, 2024
1 parent 3cfb87a commit 2cc923c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 28 deletions.
7 changes: 7 additions & 0 deletions govtool/frontend/src/stories/Input.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
};
7 changes: 7 additions & 0 deletions govtool/frontend/src/stories/TextArea.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
};
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,9 @@ const Template: StoryFn<ExternalLinkModalState> = (args) => {
{modals[modal.type]?.component && (
<Modal
open={Boolean(modals[modal.type].component)}
handleClose={
!modals[modal.type].preventDismiss
? callAll(modals[modal.type]?.onClose, () =>
openModal({ type: "none", state: null })
)
: undefined
}
handleClose={callAll(modals[modal.type]?.onClose, () =>
openModal({ type: "none", state: null })
)}
>
{modals[modal.type]?.component ?? <></>}
</Modal>
Expand Down
10 changes: 3 additions & 7 deletions govtool/frontend/src/stories/modals/StatusModal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,9 @@ const Template: StoryFn<StatusModalState> = (args) => {
{modals[modal.type]?.component && (
<Modal
open={Boolean(modals[modal.type].component)}
handleClose={
!modals[modal.type].preventDismiss
? callAll(modals[modal.type]?.onClose, () =>
openModal({ type: "none", state: null })
)
: undefined
}
handleClose={callAll(modals[modal.type]?.onClose, () =>
openModal({ type: "none", state: null })
)}
>
{modals[modal.type]?.component ?? <></>}
</Modal>
Expand Down
10 changes: 3 additions & 7 deletions govtool/frontend/src/stories/modals/StatusWithLink.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,9 @@ const Template: StoryFn<StatusModalState> = (args) => {
{modals[modal.type]?.component && (
<Modal
open={Boolean(modals[modal.type].component)}
handleClose={
!modals[modal.type].preventDismiss
? callAll(modals[modal.type]?.onClose, () =>
openModal({ type: "none", state: null })
)
: undefined
}
handleClose={callAll(modals[modal.type]?.onClose, () =>
openModal({ type: "none", state: null })
)}
>
{modals[modal.type]?.component ?? <></>}
</Modal>
Expand Down
10 changes: 3 additions & 7 deletions govtool/frontend/src/stories/modals/VotingPowerModal.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,9 @@ const Template: StoryFn<VotingPowerModalState> = (args) => {
{modals[modal.type]?.component && (
<Modal
open={Boolean(modals[modal.type].component)}
handleClose={
!modals[modal.type].preventDismiss
? callAll(modals[modal.type]?.onClose, () =>
openModal({ type: "none", state: null })
)
: undefined
}
handleClose={callAll(modals[modal.type]?.onClose, () =>
openModal({ type: "none", state: null })
)}
>
{modals[modal.type]?.component ?? <></>}
</Modal>
Expand Down

0 comments on commit 2cc923c

Please sign in to comment.