Skip to content

jberglund/designsystem

Repository files navigation

ffe-checkbox-react

React implementation of the checkbox found in FFE

Install

$ npm install --save ffe-checkbox-react ffe-form

ffe-checkbox-react depends on ffe-form being present and imported in your project. More specifically, the CSS classes related to checkboxes in ffe-core should be in your CSS Object Model when using this component:

@import 'npm://ffe-form/less/checkbox';   // Less with less-plugin-npm-import
@import '~ffe-form/less/checkbox';        // Less with webpack and less-loader

Usage

import Checkbox from 'ffe-checkbox-react';

<Checkbox
        onChange={ function }
        checked={ boolean }
        name={ string }
        label={ string }
        invalid={ boolean }
        noMargins={ boolean } // disables top- and bottom margins, useful for use in tables etc
/>

If you need a more complex description, use children:

<Checkbox>
    <Icon />
    Some text
    <AnotherIcon />
</Checkbox>

About

SpareBank 1's design system and component library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 79.7%
  • Less 18.1%
  • HTML 1.2%
  • CSS 0.8%
  • Makefile 0.1%
  • Handlebars 0.1%