This commit is contained in:
2026-07-10 22:57:16 +02:00
commit c4a692b5d2
66 changed files with 4666 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import { useState } from 'react';
import Icon from './Icon.jsx';
export default function PasswordField({ value, onChange, placeholder }) {
const [visible, setVisible] = useState(false);
return (
<div className="password-field">
<input
type={visible ? 'text' : 'password'}
placeholder={placeholder}
value={value}
onChange={onChange}
required
/>
<button
type="button"
className="password-toggle"
onClick={() => setVisible((v) => !v)}
aria-label={visible ? 'Ukryj hasło' : 'Pokaż hasło'}
>
<Icon name={visible ? 'visibility_off' : 'visibility'} />
</button>
</div>
);
}