1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-20 21:54:58 -04:00

Convert Form Components to TypeScript

This commit is contained in:
Mark McDowall
2024-10-26 14:54:23 -07:00
committed by GitHub
parent c114e2ddb7
commit 682d2b4e1b
158 changed files with 5225 additions and 6112 deletions
@@ -0,0 +1,14 @@
import React, { SyntheticEvent } from 'react';
import TextInput, { TextInputProps } from './TextInput';
// Prevent a user from copying (or cutting) the password from the input
function onCopy(e: SyntheticEvent) {
e.preventDefault();
e.nativeEvent.stopImmediatePropagation();
}
function PasswordInput(props: TextInputProps<string>) {
return <TextInput {...props} type="password" onCopy={onCopy} />;
}
export default PasswordInput;