Commit 3a35240 1 parent 4585d43 commit 3a35240 Copy full SHA for 3a35240
File tree 2 files changed +18
-1
lines changed
lib/components/PasswordInput
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ $ERROR: #ec3f3f;
5
5
.deriv-password__meter__bar {
6
6
height : 100% ;
7
7
border-radius : 0px 0px 4px 4px ;
8
- transition : " width 0.25s ease-in-out" ;
8
+ transition : width 0.25s ease-in-out ;
9
9
10
10
& __initial {
11
11
background-color : $NEUTRAL ;
Original file line number Diff line number Diff line change 1
1
import { StoryObj , Meta } from "@storybook/react" ;
2
2
import { PasswordInput } from "../../lib/main" ;
3
+ import { useState } from "react" ;
3
4
4
5
const meta = {
5
6
title : "Components/PasswordInput" ,
@@ -16,6 +17,11 @@ const meta = {
16
17
hint : "Password should have lower and uppercase English letters with numbers." ,
17
18
} ,
18
19
argTypes : {
20
+ value : {
21
+ control : {
22
+ disable : true ,
23
+ } ,
24
+ } ,
19
25
autoComplete : {
20
26
control : {
21
27
disable : true ,
@@ -50,4 +56,15 @@ export const Default: Story = {
50
56
onChange : ( ) => { } ,
51
57
hidePasswordMeter : false ,
52
58
} ,
59
+ render : ( args ) => {
60
+ const [ value , setValue ] = useState ( "" ) ;
61
+
62
+ return (
63
+ < PasswordInput
64
+ { ...args }
65
+ value = { value }
66
+ onChange = { ( e ) => setValue ( e . target . value ) }
67
+ />
68
+ ) ;
69
+ } ,
53
70
} ;
You can’t perform that action at this time.
0 commit comments