-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(block, button, checkbox, combobox): update component use (#7762)
**Related Issue:** #6374 ## Summary Audits the b-named and c-named component usages. Changes included: - `block`: spelling change - `button`: adds `type` to submit example - `checkbox`: - remove hover use - add `calcite-label` to use example - `combobox` - add `"single-persist"` `selectionMode`
- Loading branch information
1 parent
a1abc4e
commit f4fb2f6
Showing
10 changed files
with
49 additions
and
17 deletions.
There are no files selected for viewing
8 changes: 6 additions & 2 deletions
8
packages/calcite-components/src/components/block/usage/Always-open.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
Renders a header and content that remains open - no collapsible option. | ||
|
||
```html | ||
<calcite-block heading="When your son becomes a priest, do you call him..." open> | ||
<div>Father or Son?</div> | ||
<calcite-block heading="Dogs" open> | ||
<ul> | ||
<li>The first species to be domesticated</li> | ||
<li>Domesticated from wolves over 15,000 years ago</li> | ||
<li>Adapted to human behavior performing many roles such as hunting, protection, military, therapy, etc.</li> | ||
</ul> | ||
</calcite-block> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/calcite-components/src/components/block/usage/Header-with-control.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Renders a header and control with a slot for adding a single HTML element (in the header). | ||
|
||
```html | ||
<calcite-block heading="This header" description="it has an input"> | ||
<calcite-block heading="A fantastic heading" description="Add a control, such as an editing action"> | ||
<calcite-action icon="pencil" text="edit" slot="control"></calcite-action> | ||
</calcite-block> | ||
``` |
4 changes: 2 additions & 2 deletions
4
packages/calcite-components/src/components/block/usage/Header-with-icon.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Renders a header and icon with the icon. | ||
|
||
```html | ||
<calcite-block heading="Icon't believe it!"> | ||
<div slot="icon">🤯</div> | ||
<calcite-block heading="Dogs"> | ||
<div slot="icon">🐕</div> | ||
</calcite-block> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
.../calcite-components/src/components/checkbox/usage/Hovered-with-calcite-label.md
This file was deleted.
Oops, something went wrong.
6 changes: 2 additions & 4 deletions
6
...ite-components/src/components/checkbox/usage/Indeterminate-with-native-label.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
```html | ||
<label for="checked-indeterminate"> | ||
Status | ||
<calcite-checkbox checked indeterminate id="checked-indeterminate" name="checked-indeterminate"></calcite-checkbox> | ||
</label> | ||
<calcite-label for="checked-indeterminate">Status</calcite-label> | ||
<calcite-checkbox checked indeterminate id="checked-indeterminate" name="checked-indeterminate"></calcite-checkbox> | ||
``` |
8 changes: 8 additions & 0 deletions
8
packages/calcite-components/src/components/chip-group/usage/Basic.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
```html | ||
<calcite-chip-group label="Basemaps"> | ||
<calcite-chip value="topographic">Topographic</calcite-chip> | ||
<calcite-chip value="navigation">Navigation</calcite-chip> | ||
<calcite-chip value="streets">Streets</calcite-chip> | ||
<calcite-chip value="imagery">Imagery</calcite-chip> | ||
</calcite-chip-group> | ||
``` |
8 changes: 8 additions & 0 deletions
8
packages/calcite-components/src/components/chip-group/usage/SinglePersist.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
```html | ||
<calcite-chip-group label="Basemaps" selection-mode="single-persist"> | ||
<calcite-chip value="topographic" selected>Topographic</calcite-chip> | ||
<calcite-chip value="navigation">Navigation</calcite-chip> | ||
<calcite-chip value="streets">Streets</calcite-chip> | ||
<calcite-chip value="imagery">Imagery</calcite-chip> | ||
</calcite-chip-group> | ||
``` |
14 changes: 14 additions & 0 deletions
14
packages/calcite-components/src/components/combobox/usage/SinglePersist.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
```html | ||
<calcite-combobox label="Single selection-mode combobox" selection-mode="single-persist"> | ||
<calcite-combobox-item value="Trees" text-label="Trees"> | ||
<calcite-combobox-item | ||
value="CommercialDamageAssessment - Damage to Commercial Buildings" | ||
text-label="CommercialDamageAssessment - Damage to Commercial Buildings" | ||
selected | ||
></calcite-combobox-item> | ||
<calcite-combobox-item value="Sequoia" disabled text-label="Sequoia"></calcite-combobox-item> | ||
<calcite-combobox-item value="Douglas Fir" text-label="Douglas Fir"></calcite-combobox-item> | ||
</calcite-combobox-item> | ||
<calcite-combobox-item value="Rivers" text-label="Rivers"></calcite-combobox-item> | ||
</calcite-combobox> | ||
``` |