mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 20:33:02 +00:00
Enhance Checkbox to use bind:group
This commit is contained in:
parent
a522a55596
commit
ede294d553
6 changed files with 54 additions and 5 deletions
|
@ -3,12 +3,21 @@
|
|||
* @event {boolean} check
|
||||
*/
|
||||
|
||||
/** Specify the value of the checkbox */
|
||||
/**
|
||||
* Specify the value of the checkbox
|
||||
* @type {string | any}
|
||||
*/
|
||||
export let value = "";
|
||||
|
||||
/** Specify whether the checkbox is checked */
|
||||
export let checked = false;
|
||||
|
||||
/**
|
||||
* Specify the bound group
|
||||
* @type {any[]}
|
||||
*/
|
||||
export let group = [];
|
||||
|
||||
/** Specify whether the checkbox is indeterminate */
|
||||
export let indeterminate = false;
|
||||
|
||||
|
@ -71,6 +80,7 @@
|
|||
>
|
||||
<input
|
||||
bind:this="{ref}"
|
||||
bind:group
|
||||
type="checkbox"
|
||||
value="{value}"
|
||||
checked="{checked}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue