Added placeholder on input component
This commit is contained in:
parent
015984c4cf
commit
596c11cd23
1 changed files with 2 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ interface Props {
|
|||
onChange: Setter<string>
|
||||
onKeyDown?: (event: KeyboardEvent) => void
|
||||
isPassword?: boolean
|
||||
placeholder?: string
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
|
|
@ -17,7 +18,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" type={props.isPassword ? 'password' : 'text'} />
|
||||
<TextField.Input class="text-field__input" type={props.isPassword ? 'password' : 'text'} placeholder={props.placeholder || ''}/>
|
||||
</TextField>
|
||||
</>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue