Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add reset user password action #1320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add reset password dialog to storybook
  • Loading branch information
BrunoQuaresma committed May 6, 2022
commit 89573399df28356dd82d4126e67c80f0cb25593c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Story } from "@storybook/react"
import React from "react"
import { MockUser } from "../../testHelpers"
import { generateRandomString } from "../../util/random"
import { ResetPasswordDialog, ResetPasswordDialogProps } from "./ResetPasswordDialog"

export default {
title: "components/ResetPasswordDialog",
component: ResetPasswordDialog,
argTypes: {
onClose: { action: "onClose" },
onConfirm: { action: "onConfirm" },
},
}

const Template: Story<ResetPasswordDialogProps> = (args: ResetPasswordDialogProps) => <ResetPasswordDialog {...args} />

export const Example = Template.bind({})
Example.args = {
open: true,
user: MockUser,
newPassword: generateRandomString(12),
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as TypesGen from "../../api/typesGenerated"
import { CodeBlock } from "../CodeBlock/CodeBlock"
import { Dialog, DialogActionButtons, DialogTitle } from "../Dialog/Dialog"

interface ResetPasswordDialogProps {
export interface ResetPasswordDialogProps {
open: boolean
onClose: () => void
onConfirm: () => void
Expand Down