1.0.0-alpha.30 • Published 5 years ago

@talixo/optional v1.0.0-alpha.30

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Talixo Optional

UI Component which represents Optional

How to install

Package is available as @talixo/optional in NPM registry, so you can use it in your project using npm install @talixo/optional --save or yarn add @talixo/optional.

Requirements

Your package should additionally have some extra dependencies:

  • @talixo/checkbox: ^1.0.0-alpha.30
  • @talixo/shared: ^1.0.0-alpha.30
  • prop-types: ^15.6.1
  • react: ^16.2.0
  • react-dom: ^16.2.0

These packages are required by @talixo/optional, but you have to install them manually, to avoid having different versions of these in your application.

Supported props

It allows any props which are allowed for div. Additionally, it handles some differently:

Property nameTypeDefaultDescription
classNamestringn/aadditional class name passed to wrapper
disabledbooleann/adisable optional component
readOnlybooleann/aset optional component to read-only state
labelstringn/alabel to display
idstringn/aid of form field
namestringn/aname of form field
onChangefunctionn/asend value to parent component
value*n/ainput value
childrennoden/aform element which should be treat as optional

Changelog

  • 0.1.0 - initial version