Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 806 Bytes

File metadata and controls

24 lines (21 loc) · 806 Bytes

<ShowPasswordButton /> Component

This component is represents control visibility button for password <Input />. It requires context which is provided by <PasswordGroup />.

Usage

<Form {...FormProps}>
    <FormGroup {...FormGroupProps}>
        <PasswordGroup {...HTMLDivElementProps}>
            <Input  {...HTMLInputProps} />
            <ShowPasswordButton 
                clickToShow={true}
                hoverToShow={false}
                {...HTMLButtonElementProps}          
            />
        </InputRange>   
    </FormGroup>
</Form>

where:

  • clickToShow - show password on click. Optional. Default - true.
  • hoverToShow - show password on hover. Optional. Default - false.