mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-09-18 09:29:24 +00:00

# Description of Changes Enable ESLint [no-unused-vars rule](https://typescript-eslint.io/rules/no-unused-vars/)
31 lines
1.0 KiB
TypeScript
31 lines
1.0 KiB
TypeScript
import { Stack, PasswordInput } from "@mantine/core";
|
|
import { useTranslation } from "react-i18next";
|
|
import { RemovePasswordParameters } from "../../../hooks/tools/removePassword/useRemovePasswordParameters";
|
|
|
|
interface RemovePasswordSettingsProps {
|
|
parameters: RemovePasswordParameters;
|
|
onParameterChange: (key: keyof RemovePasswordParameters, value: string) => void;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
const RemovePasswordSettings = ({ parameters, onParameterChange, disabled = false }: RemovePasswordSettingsProps) => {
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<Stack gap="md">
|
|
<Stack gap="sm">
|
|
<PasswordInput
|
|
label={t('removePassword.password.label', 'Current Password')}
|
|
placeholder={t('removePassword.password.placeholder', 'Enter current password')}
|
|
value={parameters.password}
|
|
onChange={(e) => onParameterChange('password', e.target.value)}
|
|
disabled={disabled}
|
|
required
|
|
/>
|
|
</Stack>
|
|
</Stack>
|
|
);
|
|
};
|
|
|
|
export default RemovePasswordSettings;
|