1.0.1 • Published 6 years ago

cricket-trial-kit v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

Npm package for cricket toolkit

Packages created in React and are imported in different projects.

Usage

  1. Open console
  2. Type or copy yarn add cricket-toolkit.
  3. import using import Button from 'cricket-toolkit'
  4. Use the Button component in your components

Props

  • url: Accepts a string. URL of the page the component will redirect to. If no URL is provided then the output is a <button></buttom> instead of <a></a>.
  • newPage: Accepts a boolean. Only available on a Button with url, it'll indicate if target is set to _blank.
  • size: Accepts a string. Valid inputs 'small', 'large'. Will change the button padding accordingly.
  • shouldFitContainer: Accepts a boolean value. If set to true button will fit the width of parent container.
  • btnText: Accepts a string. This field is mandatory. This is the button call to action.
  • btnClass: Accepts any string. This will define button theme and style.
  • clickHandler: Accepts a function. Defines interaction of the button when clicked on.

Resources