Skip to content

Commit 094f8ea

Browse files
committed
fix docs
1 parent 785d9cd commit 094f8ea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/@react-spectrum/checkbox/src/Checkbox.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ import {useToggleState} from '@react-stately/toggle';
3232
*/
3333
export const Checkbox = forwardRef(function Checkbox(props: SpectrumCheckboxProps, ref: FocusableRef<HTMLLabelElement>) {
3434
let groupState = useContext(CheckboxGroupContext);
35-
return groupState ? <CheckboxInGroup {...props} ref={ref} /> : <CheckboxStandalone {...props} ref={ref} />;
35+
if (groupState) {
36+
return <CheckboxInGroup {...props} ref={ref} />;
37+
}
38+
return <CheckboxStandalone {...props} ref={ref} />;
3639
});
3740

3841
let CheckboxInGroup = forwardRef(function CheckboxInGroup(props: SpectrumCheckboxProps, ref: FocusableRef<HTMLLabelElement>) {

0 commit comments

Comments
 (0)