Added password type input

This commit is contained in:
Patrick Alvin Alcala 2025-10-16 10:08:10 +08:00
parent 45f8d3693d
commit 3c44ce45e3

View file

@ -7,6 +7,7 @@ interface Props {
value: string
onChange: Setter<string>
onKeyDown?: (event: KeyboardEvent) => void
isPassword?: boolean
}
export default (props: Props) => {
@ -16,7 +17,7 @@ export default (props: Props) => {
<Show when={props.label}>
<TextField.Label class="text-field__label">{props.label}</TextField.Label>
</Show>
<TextField.Input class="text-field__input" />
<TextField.Input class="text-field__input" type={props.isPassword ? 'password' : 'text'} />
</TextField>
</>
)