@dpa-id-components/ui-checkboxgroup

0.5.0 • Public • Published

@dpa-id-components/ui-checkboxgroup

UiCheckBoxGroup Vue 2.x menu component based on the dpa Design Kit

Installation

yarn add @dpa-id-components/ui-checkboxgroup

Usage

<template>
  <UiCheckBoxGroup :value="checkboxes" :first-entry-checks-all="true" @item-checked="handleEvent"
                   @checked-all="handleEvent" />
</template>

<script>
  import UiCheckBoxGroup from "@dpa-id-components/ui-checkboxgroup";


  export default {
    components: {
      UiCheckBoxGroup,
    }
    props: {
      checkboxes: [
        {
          name: "alle Ressorts",
          isChecked: false,
        },
        {
          name: "Wirtschaft",
          isChecked: false,
          iconName: "audio-inline",
        },
      ],
    }
    methods: {
      handleEvent: console.log,
    },
  };
</script>

Demo

View a demo of <ui-checkboxgroup> on Storybook

Props

The "CheckboxItem"-Type is used. Consisting of "name", "isChecked" and "iconName"

Name Type Default Description
value CheckboxItem `` Adds the value to the checkbox, consiting of name, isChecked and iconName ("CheckboxItem"-Type)
firstEntryChecksAll Boolean false Wether the first item checks all the boxes

Events

Name Type Description
checked-all Emitted when all items are selected
item-checked Emitted when each individual item is checked

Readme

Keywords

none

Package Sidebar

Install

npm i @dpa-id-components/ui-checkboxgroup

Weekly Downloads

0

Version

0.5.0

License

MIT

Unpacked Size

1.16 MB

Total Files

10

Last publish

Collaborators

  • goersch.juliane
  • martinherweg
  • borchert.manja
  • roessel.nico
  • karlbanke
  • hajo.cirksena.dpa
  • schubert.florian
  • michelle3105
  • arifpehlivan
  • dpa-connect-deployment
  • antje.sommer
  • mlnmln
  • kgierke
  • andrewbeng89
  • mridul_dpa