Added password type input
This commit is contained in:
parent
45f8d3693d
commit
3c44ce45e3
1 changed files with 2 additions and 1 deletions
|
|
@ -7,6 +7,7 @@ interface Props {
|
||||||
value: string
|
value: string
|
||||||
onChange: Setter<string>
|
onChange: Setter<string>
|
||||||
onKeyDown?: (event: KeyboardEvent) => void
|
onKeyDown?: (event: KeyboardEvent) => void
|
||||||
|
isPassword?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export default (props: Props) => {
|
export default (props: Props) => {
|
||||||
|
|
@ -16,7 +17,7 @@ export default (props: Props) => {
|
||||||
<Show when={props.label}>
|
<Show when={props.label}>
|
||||||
<TextField.Label class="text-field__label">{props.label}</TextField.Label>
|
<TextField.Label class="text-field__label">{props.label}</TextField.Label>
|
||||||
</Show>
|
</Show>
|
||||||
<TextField.Input class="text-field__input" />
|
<TextField.Input class="text-field__input" type={props.isPassword ? 'password' : 'text'} />
|
||||||
</TextField>
|
</TextField>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue