lidarr/frontend/src/Components/Form/PasswordInput.js
Bogdan 77861e4303 Refactor PasswordInput to use type password
(cherry picked from commit c7c1e3ac9e5bffd4d92298fed70916e3808613fd)
2024-05-10 14:04:24 +03:00

24 lines
444 B
JavaScript

import React from 'react';
import TextInput from './TextInput';
// Prevent a user from copying (or cutting) the password from the input
function onCopy(e) {
e.preventDefault();
e.nativeEvent.stopImmediatePropagation();
}
function PasswordInput(props) {
return (
<TextInput
{...props}
type="password"
onCopy={onCopy}
/>
);
}
PasswordInput.propTypes = {
...TextInput.props
};
export default PasswordInput;