-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed the inconsistencies in checbox group
- Loading branch information
1 parent
a58636a
commit 075b729
Showing
11 changed files
with
144 additions
and
1,757 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,3 @@ | ||
import { createSignal, For } from "solid-js"; | ||
import { CheckboxGroup } from "../src"; | ||
import style from "./App.module.css"; | ||
|
||
export default function App() { | ||
const [value, setValue] = createSignal(["cats"]); | ||
|
||
return ( | ||
<CheckboxGroup.Root | ||
class={style["checkbox-group"]} | ||
values={value()} | ||
onChange={setValue} | ||
> | ||
<CheckboxGroup.Label class={style["checkbox-group__label"]}> | ||
Favorite fruit | ||
</CheckboxGroup.Label> | ||
<div class={style["checkbox-group__items"]} role="presentation"> | ||
<For each={["Apple", "Orange", "Watermelon"]}> | ||
{(fruit) => ( | ||
<CheckboxGroup.Item value={fruit} class={style.checkbox}> | ||
<CheckboxGroup.ItemInput class={style.checkbox__input} /> | ||
<CheckboxGroup.ItemControl class={style.checkbox__control}> | ||
<CheckboxGroup.ItemIndicator class={style.checkbox__indicator} /> | ||
</CheckboxGroup.ItemControl> | ||
<CheckboxGroup.ItemLabel class={style.checkbox__label}> | ||
{fruit} | ||
</CheckboxGroup.ItemLabel> | ||
</CheckboxGroup.Item> | ||
)} | ||
</For> | ||
</div> | ||
</CheckboxGroup.Root> | ||
); | ||
return (<></>); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.