From a2f28c0e1fe1d10d30ba226b76412be9be33b2e1 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Fri, 19 Mar 2021 10:42:00 +0300 Subject: [PATCH] Refactor on Password demo --- src/showcase/password/PasswordDemo.js | 8 +++---- src/showcase/password/PasswordDoc.js | 30 +++++++++++---------------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/src/showcase/password/PasswordDemo.js b/src/showcase/password/PasswordDemo.js index 6eb1a76ab9..4d6d0675b8 100644 --- a/src/showcase/password/PasswordDemo.js +++ b/src/showcase/password/PasswordDemo.js @@ -11,10 +11,10 @@ export class PasswordDemo extends Component { super(props); this.state = { - value1: null, - value2: null, - value3: null, - value4: null + value1: '', + value2: '', + value3: '', + value4: '' }; } diff --git a/src/showcase/password/PasswordDoc.js b/src/showcase/password/PasswordDoc.js index c4c5692be4..553e10a3ba 100644 --- a/src/showcase/password/PasswordDoc.js +++ b/src/showcase/password/PasswordDoc.js @@ -24,10 +24,10 @@ export class PasswordDemo extends Component { super(props); this.state = { - value1: null, - value2: null, - value3: null, - value4: null + value1: '', + value2: '', + value3: '', + value4: '' }; } @@ -76,10 +76,10 @@ import { Divider } from 'primereact/divider'; import './PasswordDemo.css'; const PasswordDemo = () => { - const [value1, setValue1] = useState(null); - const [value2, setValue2] = useState(null); - const [value3, setValue3] = useState(null); - const [value4, setValue4] = useState(null); + const [value1, setValue1] = useState(''); + const [value2, setValue2] = useState(''); + const [value3, setValue3] = useState(''); + const [value4, setValue4] = useState(''); const header =
Pick a password
; const footer = ( @@ -124,10 +124,10 @@ import { Divider } from 'primereact/divider'; import './PasswordDemo.css'; const PasswordDemo = () => { - const [value1, setValue1] = useState(null); - const [value2, setValue2] = useState(null); - const [value3, setValue3] = useState(null); - const [value4, setValue4] = useState(null); + const [value1, setValue1] = useState(''); + const [value2, setValue2] = useState(''); + const [value3, setValue3] = useState(''); + const [value4, setValue4] = useState(''); const header =
Pick a password
; const footer = ( @@ -220,12 +220,6 @@ import {Password} from 'primereact/password'; null Unique identifier of the element. - - value - any - null - Value of the component. - promptLabel string