0.1.1 • Published 3 years ago

@bdt-component-library/password-field v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

PasswordField Component

About

This is a component published as its own package from our component library monorepo: https://github.com/BenefitsDataTrust/ui-components. Setup instructions, as well as higher-level goals and concerns can be found from the main project README.

Description

Handles display of the PasswordField which wraps the TextField component.

API

proptyperequireddefaultexplanation
classNamestringno""Adds an optional classname to the text field
idstringyesundefinedInput id attr
valuestringno""Input value
requiredbooleannofalseDetermines if the input is required
namestringno""Input name attr
placeholderstringno""Input placeholder text
disabledbooleannofalseDetermines input disabled state
onChangefunctionno() => {}Event handler for onchange events
testIdstringno""Allows an id to be added for testing purposes via the data-testid attr
noBottomMarginbooleannofalseRemoves bottom margin of input for more control over formatting
hasSuccessbooleannofalseDetermines the input's success state
hasErrorbooleannofalseDetermines the input's error state