Skip to content

Commit

Permalink
docs: add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideMininni-Fincons committed Jul 12, 2024
1 parent d3929ff commit 6641735
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/elements/checkbox/checkbox/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ The component can be displayed in `disabled` or `required` state by using the se

## Style

The component has two `size`, named `s` and `m` (default).
The component has three `size`, named `xs`, `s` and `m` (default).

```html
<sbb-checkbox value="size" size="m">Size</sbb-checkbox>
<sbb-checkbox value="size" size="xs">Size</sbb-checkbox>

<sbb-checkbox value="size" size="a">Size</sbb-checkbox>
```

The component's label can be displayed in bold using the `sbb-text--bold` class on a wrapper tag:
Expand Down
12 changes: 11 additions & 1 deletion src/elements/visual-checkbox/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ It has four different states related to the properties `checked`, `indeterminate
- an indeterminate state (`checked` unset and `indeterminate` set to `true`): a horizontal line is displayed in the square;
- a disabled state (`disabled` set to `true`): a grayed out empty square is shown.

## Style

The component has three `size`, named `xs`, `s` and `m` (default).

```html
<sbb-visual-checkbox size="xs"></sbb-visual-checkbox>

<sbb-visual-checkbox size="a"></sbb-visual-checkbox>
```

<!-- Auto Generated Below -->

## Properties
Expand All @@ -22,4 +32,4 @@ It has four different states related to the properties `checked`, `indeterminate
| `disabled` | `disabled` | public | `boolean` | `false` | Whether the component is disabled. |
| `indeterminate` | `indeterminate` | public | `boolean` | `false` | Indeterminate state. |
| `negative` | `negative` | public | `boolean` | `false` | Negative coloring variant flag. |
| `size` | `size` | public | `SbbCheckboxSize` | `'m'` | Indeterminate state. |
| `size` | `size` | public | `SbbCheckboxSize` | `'m'` | Size of the checkbox. |
2 changes: 1 addition & 1 deletion src/elements/visual-checkbox/visual-checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class SbbVisualCheckboxElement extends SbbDisabledMixin(SbbNegativeMixin(
/** Indeterminate state. */
@property({ reflect: true, type: Boolean }) public indeterminate = false;

/** Indeterminate state. */
/** Size of the checkbox. */
@property({ reflect: true }) public size: SbbCheckboxSize = 'm';

protected override render(): TemplateResult {
Expand Down

0 comments on commit 6641735

Please sign in to comment.