0.0.6 • Published 5 years ago

@newamerica/components v0.0.6

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

@newamerica/components

A collection of user interface components that are helpful for complicated data visualizations.

Installation

npm install @newamerica/components --save

Components

API

ButtonGroup

From ./src/ButtonGroup/index.js

proptypedefaultrequireddescription
activeUnion<String \| Number>:x:
onChangeFunction:white_check_mark:This function will receive the currently selected button's id
optionsArray[]<Shape>:white_check_mark:
options[].idUnion<String \| Number>:x:
options[].textString:x:

CheckboxGroup

From ./src/CheckboxGroup/index.js

proptypedefaultrequireddescription
onChangeFunction:white_check_mark:This function will receive an object with all checkbox values.
optionsArray[]<Shape>:white_check_mark:
options[].checkedBoolean:x:
options[].idUnion<String \| Number>:x:
options[].labelString:x:
orientationEnum("vertical","horizontal")"vertical":x:
selectButtonsBooleanfalse:x:If true, adds buttons that let the user select and deselect all checkboxes at once.
styleObject:x:
titleString:x:

Search

From ./src/Search/index.js

proptypedefaultrequireddescription
classNameString:x:
onChangeFunction:white_check_mark:This function will receive the current value of the search box
placeholderString:x:
styleObject:x:

Select

From ./src/Select/index.js

proptypedefaultrequireddescription
classNameString:x:
onChangeFunction:white_check_mark:This function will receive the current value of the select dropdown.
optionsArray[]<String>:white_check_mark:
selectedString:x:

Slider

From ./src/Slider/index.js

proptypedefaultrequireddescription
idString:x:
labelString:white_check_mark:
maxNumber:white_check_mark:
minNumber:white_check_mark:
onChangeFunction:white_check_mark:This function will receive the entire event when the slider has changed. Use event.target.value to get the current slider value.
stepNumber:x:

Toggle

From ./src/Toggle/index.js

proptypedefaultrequireddescription
checkedBooleanfalse:x:
idString:x:
offLabelString:white_check_mark:
onChangeFunction:white_check_mark:This function will receive a boolean value for whether or not the toggle is on/off.
onLabelString:white_check_mark: