Skip to content

Commit

Permalink
chore(Checkbox): updated example CSS to use logical property (#9604)
Browse files Browse the repository at this point in the history
* chore(Checkbox): updated example CSS to use logical property

* Moved nested checkboxes to body prop

* Removed import of deleted stylesheet
  • Loading branch information
thatblindgeye authored Sep 19, 2023
1 parent 1c70d68 commit f6b0c5a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 21 deletions.
10 changes: 8 additions & 2 deletions packages/react-core/src/components/Checkbox/examples/Checkbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,52 @@ cssPrefix: pf-v5-c-check
propComponents: ['Checkbox']
---

import './checkbox.css';

## Examples

### Controlled

```ts file='./CheckboxControlled.tsx'

```

### Uncontrolled

```ts file='./CheckboxUncontrolled.tsx'

```

### Disabled

```ts file='./CheckboxDisabled.tsx'

```

### Checkbox with description

```ts file='./CheckboxWithDescription.tsx'

```

### Checkbox with body

```ts file='./CheckboxWithBody.tsx'

```

### Checkbox with description and body

```ts file='./CheckboxWithDescriptionBody.tsx'

```

### Standalone input

```ts file='./CheckboxStandaloneInput.tsx'

```

### Required input

```ts file='./CheckboxRequired.tsx'

```
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,24 @@ export const CheckboxControlled: React.FunctionComponent = () => {
onChange={handleChange}
id="controlled-check-1"
name="check1"
/>
<Checkbox
className="nested"
label="Child CheckBox 1"
isChecked={isChecked2}
onChange={handleChange}
id="controlled-check-2"
name="check2"
/>
<Checkbox
className="nested"
label="Child CheckBox 2"
isChecked={isChecked3}
onChange={handleChange}
id="controlled-check-3"
name="check3"
body={
<>
<Checkbox
label="Child CheckBox 1"
isChecked={isChecked2}
onChange={handleChange}
id="controlled-check-2"
name="check2"
/>
<Checkbox
label="Child CheckBox 2"
isChecked={isChecked3}
onChange={handleChange}
id="controlled-check-3"
name="check3"
/>
</>
}
/>
<Checkbox
label="Controlled CheckBox"
Expand Down

This file was deleted.

0 comments on commit f6b0c5a

Please sign in to comment.