mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
chore(checkbox): stories comments delete
This commit is contained in:
parent
f502080e69
commit
97ab097171
@ -90,83 +90,16 @@ DisableAnimation.args = {
|
||||
export const Controlled = () => {
|
||||
const [selected, setSelected] = React.useState<boolean>(true);
|
||||
|
||||
// const [groupSelected, setGroupSelected] = React.useState<string[]>(["buenos-aires", "sydney"]);
|
||||
|
||||
React.useEffect(() => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log("Checkbox ", selected);
|
||||
}, [selected]);
|
||||
|
||||
// React.useEffect(() => {
|
||||
// // eslint-disable-next-line no-console
|
||||
// console.log("CheckboxGroup ", groupSelected);
|
||||
// }, [groupSelected]);
|
||||
|
||||
return (
|
||||
<div className="flex flex-row gap-2">
|
||||
<Checkbox isSelected={selected} onChange={setSelected} {...checkbox.defaultVariants}>
|
||||
Subscribe (controlled)
|
||||
</Checkbox>
|
||||
{/* <Checkbox.Group
|
||||
color="warning"
|
||||
label="Select cities"
|
||||
labelColor="primary"
|
||||
value={groupSelected}
|
||||
onChange={setGroupSelected}
|
||||
>
|
||||
<Checkbox color="primary" value="buenos-aires">
|
||||
Buenos Aires
|
||||
</Checkbox>
|
||||
<Checkbox labelColor="warning" value="sydney">
|
||||
Sydney
|
||||
</Checkbox>
|
||||
<Checkbox labelColor="error" value="london">
|
||||
London
|
||||
</Checkbox>
|
||||
<Checkbox value="tokyo">Tokyo</Checkbox>
|
||||
</Checkbox.Group> */}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
// export const Group = () => {
|
||||
// // eslint-disable-next-line no-console
|
||||
// const handleGroupChange = (value: string[]) => console.log(value);
|
||||
|
||||
// return (
|
||||
// <Checkbox.Group
|
||||
// color="warning"
|
||||
// defaultValue={["buenos-aires"]}
|
||||
// label="Select cities"
|
||||
// labelColor="primary"
|
||||
// onChange={handleGroupChange}
|
||||
// >
|
||||
// <Checkbox color="primary" value="buenos-aires">
|
||||
// Buenos Aires
|
||||
// </Checkbox>
|
||||
// <Checkbox labelColor="warning" value="sydney">
|
||||
// Sydney
|
||||
// </Checkbox>
|
||||
// <Checkbox isDisabled labelColor="error" value="london">
|
||||
// London
|
||||
// </Checkbox>
|
||||
// <Checkbox value="tokyo">Tokyo</Checkbox>
|
||||
// </Checkbox.Group>
|
||||
// );
|
||||
// };
|
||||
|
||||
// export const GroupRow = () => (
|
||||
// <Checkbox.Group
|
||||
// color="warning"
|
||||
// defaultValue={["1"]}
|
||||
// label="Select cities"
|
||||
// orientation="horizontal"
|
||||
// >
|
||||
// <Checkbox color="primary" value="1">
|
||||
// Buenos Aires
|
||||
// </Checkbox>
|
||||
// <Checkbox value="2">Sydney</Checkbox>
|
||||
// <Checkbox value="3">London</Checkbox>
|
||||
// <Checkbox value="4">Tokyo</Checkbox>
|
||||
// </Checkbox.Group>
|
||||
// );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user