1.1.2 • Published 3 years ago

child-age-selector-package v1.1.2

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

Run: npm -i --save child-age-selector-package

in your react component make a variable to set the display status of selector (E:g: childSelector)

       `{
        childSelector && <ChildAgeSelector setChilds={setChilds} 
        childs={searchData.childs} 
        setChildSelector={setChildSelector}
        buttonClasses="btn btn-primary"
        labels={{
          dropDownLabel: "year(s) old",
          childrace: "Childrance",
          childLabel: "Child {number} is "
        }} />
      }`

you may use following methods in your component to work with the selector

const defaultData = { childs: [] }

const [childSelector, setChildSelector] = useState(false); const [searchData, setSearchData] = useState(defaultData)

const setChilds = (childs) => { setSearchData({ ...searchData, childs: childs }) }

Style prop objects are allowed:

mainStyles and buttonStyles

If you use bootstrap, you will be able to easily handle styles

1.1.2

3 years ago

1.1.1

3 years ago

1.0.2

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago