Skip to content

Commit

Permalink
Refactor on Password demo
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Mar 19, 2021
1 parent 332650b commit a2f28c0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
8 changes: 4 additions & 4 deletions src/showcase/password/PasswordDemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: ''
};
}

Expand Down
30 changes: 12 additions & 18 deletions src/showcase/password/PasswordDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: ''
};
}
Expand Down Expand Up @@ -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 = <h6>Pick a password</h6>;
const footer = (
Expand Down Expand Up @@ -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 = <h6>Pick a password</h6>;
const footer = (
Expand Down Expand Up @@ -220,12 +220,6 @@ import {Password} from 'primereact/password';
<td>null</td>
<td>Unique identifier of the element.</td>
</tr>
<tr>
<td>value</td>
<td>any</td>
<td>null</td>
<td>Value of the component.</td>
</tr>
<tr>
<td>promptLabel</td>
<td>string</td>
Expand Down

0 comments on commit a2f28c0

Please sign in to comment.