import { useState } from
"react"
;
import
"rsuite/dist/rsuite.min.css"
;
import { Checkbox, CheckboxGroup } from
"rsuite"
;
export
default
function
App() {
const [chkValue, setChkValue] = useState([
"a"
,
"c"
]);
return
(
<center>
<div>
<h2>GeeksforGeeks</h2>
<h4 style={{ color:
"green"
}}>
React Suite Checkbox Group Controlled
</h4>
<div style={{ marginTop: 20, width: 1000 }}>
<CheckboxGroup
inline
name=
"checkboxList"
value={chkValue}
onChange={(value) => {
setChkValue(value);
}}
>
<Checkbox value=
"a"
title=
"T&C"
>
I agree to terms & conditions of GFG.
</Checkbox>
<Checkbox value=
"b"
>
Want the premium access to
GeeksforGeeks Job portal!
</Checkbox>
<Checkbox value=
"c"
disabled>
Sign up of GeeksforGeeks newsletter.
</Checkbox>
</CheckboxGroup>
</div>
</div>
</center>
);
}