forked from uber/baseweb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add mask for pin-code (uber#3507)
* add mask for pincode * test(vrt): update visual snapshots for 3151449 [skip ci] (uber#3508) Co-authored-by: UberOpenSourceBot <[email protected]> * test(vrt): update visual snapshots for 3151449 [skip ci] (uber#3511) Co-authored-by: UberOpenSourceBot <[email protected]> * add e2e test * fix typo * test(vrt): update visual snapshots for 5ec19bc [skip ci] (uber#3525) Co-authored-by: UberOpenSourceBot <[email protected]> * modify styles * fix typo * modify docs * fix typo * fix typo * modify docs Co-authored-by: UberOpenSourceBot <[email protected]> Co-authored-by: UberOpenSourceBot <[email protected]> Co-authored-by: Chase Starr <[email protected]>
- Loading branch information
1 parent
5ac4dd9
commit 1a1e8d5
Showing
16 changed files
with
158 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// @flow | ||
import React from 'react'; | ||
import {PinCode} from 'baseui/pin-code'; | ||
|
||
export default () => { | ||
const [valuesA, setValuesA] = React.useState(['', '', '', '']); | ||
const [valuesB, setValuesB] = React.useState(['', '', '', '']); | ||
|
||
return ( | ||
<React.Fragment> | ||
<PinCode | ||
mask | ||
values={valuesA} | ||
onChange={({values}) => { | ||
setValuesA(values); | ||
}} | ||
/> | ||
<br /> | ||
<PinCode | ||
mask="*" | ||
values={valuesB} | ||
onChange={({values}) => { | ||
setValuesB(values); | ||
}} | ||
/> | ||
</React.Fragment> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
import {PinCode} from 'baseui/pin-code'; | ||
|
||
export default () => { | ||
const [valuesA, setValuesA] = React.useState(['', '', '', '']); | ||
const [valuesB, setValuesB] = React.useState(['', '', '', '']); | ||
|
||
return ( | ||
<React.Fragment> | ||
<PinCode | ||
mask | ||
values={valuesA} | ||
onChange={({values}) => { | ||
setValuesA(values); | ||
}} | ||
/> | ||
<br /> | ||
<PinCode | ||
mask="*" | ||
values={valuesB} | ||
onChange={({values}) => { | ||
setValuesB(values); | ||
}} | ||
/> | ||
</React.Fragment> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
Copyright (c) 2018-2020 Uber Technologies, Inc. | ||
This source code is licensed under the MIT license found in the | ||
LICENSE file in the root directory of this source tree. | ||
*/ | ||
// @flow | ||
|
||
import React from 'react'; | ||
|
||
import {StatefulPinCode} from '../index.js'; | ||
|
||
export default function Scenario() { | ||
const [values, setValues] = React.useState(['', '', '', '']); | ||
return ( | ||
<div> | ||
<StatefulPinCode | ||
values={values} | ||
onChange={({values}) => setValues(values)} | ||
clearOnEscape | ||
mask="*" | ||
/> | ||
<p data-testid="pinCodeValue">password:{values.join(' ')} </p> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters