0.0.1 • Published 11 months ago

@congritta-ui/checkbox v0.0.1

Weekly downloads
-
License
-
Repository
github
Last release
11 months ago

@congritta-ui/checkbox

This is checkbox React component and part of Congritta UI

How to install

  1. Install @congritta-ui/base if you didn't it yet. (More info at: http://ui.congritta.com/docs/base);
  2. Install @congritta-ui/checkbox;

Add

import Checkbox from '@congritta-ui/checkbox';

into your code

How to use

Example:

export default MyComponentWidthCheckbox() {
  const [value, setValue] = useState(true)

  return (
    <Checkbox
      isActive={true}
      onTriggered={() => setValue(!value)}
      contents="Text for checkbox here"
    />
  )
}

Props

Prop nameDescriptionIs RequiredDefault value
isActiveIs checkbox activetrue
contentsContents to the right of checkboxfalse
onTriggeredFunction that executes when user clicks on Checkbox componentfalse
unactiveIconsvg element of checkbox when inactivefalse<Integrated icon>
activeIconsvg element of checkbox when activefalse<Integrated icon>
wrapperClassNameClass name for wrapper for adding additional stylesfalse
iconClassNameClass name for checkbox icon wrapper for adding additional stylesfalse
contentsClassNameClass name for checkbox contents wrapper for adding additional stylesfalse