Skip to content

Commit 8957339

Browse files
committed
Add reset password dialog to storybook
1 parent 2a9b9be commit 8957339

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Story } from "@storybook/react"
2+
import React from "react"
3+
import { MockUser } from "../../testHelpers"
4+
import { generateRandomString } from "../../util/random"
5+
import { ResetPasswordDialog, ResetPasswordDialogProps } from "./ResetPasswordDialog"
6+
7+
export default {
8+
title: "components/ResetPasswordDialog",
9+
component: ResetPasswordDialog,
10+
argTypes: {
11+
onClose: { action: "onClose" },
12+
onConfirm: { action: "onConfirm" },
13+
},
14+
}
15+
16+
const Template: Story<ResetPasswordDialogProps> = (args: ResetPasswordDialogProps) => <ResetPasswordDialog {...args} />
17+
18+
export const Example = Template.bind({})
19+
Example.args = {
20+
open: true,
21+
user: MockUser,
22+
newPassword: generateRandomString(12),
23+
}

site/src/components/ResetPasswordDialog/ResetPasswordDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import * as TypesGen from "../../api/typesGenerated"
77
import { CodeBlock } from "../CodeBlock/CodeBlock"
88
import { Dialog, DialogActionButtons, DialogTitle } from "../Dialog/Dialog"
99

10-
interface ResetPasswordDialogProps {
10+
export interface ResetPasswordDialogProps {
1111
open: boolean
1212
onClose: () => void
1313
onConfirm: () => void

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy