Skip to content

Commit

Permalink
docs(Checkbox): disable checkbox group heading with knob (#7134)
Browse files Browse the repository at this point in the history
Co-authored-by: Alessandra Davila <[email protected]>
Co-authored-by: TJ Egan <[email protected]>
  • Loading branch information
3 people authored Oct 27, 2020
1 parent c91cec5 commit 8600958
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/react/src/components/Checkbox/Checkbox-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import React from 'react';
import classNames from 'classnames';
import { action } from '@storybook/addon-actions';
import { withKnobs, boolean, text } from '@storybook/addon-knobs';
import Checkbox from '../Checkbox';
Expand Down Expand Up @@ -63,7 +64,12 @@ const props = () => ({

export const playground = () => (
<fieldset className={`${prefix}--fieldset`}>
<legend className={`${prefix}--label`}>Checkbox heading</legend>
<legend
className={classNames(`${prefix}--label`, {
[`${prefix}--label--disabled`]: props().disabled,
})}>
Checkbox heading
</legend>
<Checkbox {...props()} id="checkbox-label-1" />
<Checkbox {...props()} id="checkbox-label-2" />
</fieldset>
Expand Down

0 comments on commit 8600958

Please sign in to comment.