mirror of
https://github.com/plankanban/planka.git
synced 2025-07-25 08:09:44 +02:00
Add visibility toggle of password input. Closes #2
This commit is contained in:
parent
a11f6260c0
commit
00c7f514ae
25 changed files with 111 additions and 92 deletions
21
client/src/lib/custom-ui/components/Input/InputMask.jsx
Normal file
21
client/src/lib/custom-ui/components/Input/InputMask.jsx
Normal file
|
@ -0,0 +1,21 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Input } from 'semantic-ui-react';
|
||||
|
||||
import MaskedInput from './MaskedInput';
|
||||
|
||||
const InputMask = React.forwardRef(({ mask, maskChar, ...props }, ref) => (
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||
<Input {...props} ref={ref} input={<MaskedInput mask={mask} maskChar={maskChar} />} />
|
||||
));
|
||||
|
||||
InputMask.propTypes = {
|
||||
mask: PropTypes.string.isRequired,
|
||||
maskChar: PropTypes.string,
|
||||
};
|
||||
|
||||
InputMask.defaultProps = {
|
||||
maskChar: undefined,
|
||||
};
|
||||
|
||||
export default React.memo(InputMask);
|
Loading…
Add table
Add a link
Reference in a new issue