Skip to content

Commit a0d1fe9

Browse files
authored
docs: update button docs and stories to follow guidelines (#18674)
1 parent 654a005 commit a0d1fe9

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

packages/react/src/components/Button/Button.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { stackblitzPrefillConfig } from '../../../previewer/codePreviewer';
2525
- [Tertiary Button](#tertiary)
2626
- [Ghost Button](#ghost)
2727
- [Danger Button](#danger-button)
28-
- [Icon-only Buttons](#icon-only-buttons)
28+
- [Icon-only Button](#icon-only-button)
2929
- [Set of Buttons](#set-of-buttons)
3030
- [Skeleton state](#skeleton-state)
3131
- [Component API](#component-api)
@@ -103,8 +103,8 @@ Determining which danger button style to use will depend on the level of
103103
emphasis you want to give to the danger action. Destructive actions that are
104104
considered a required or primary step in a workflow should use the primary
105105
danger button style. However, if a destructive action is just one of several
106-
actions a user could choose from, then a lower emphasis style like the tertiary
107-
danger button or the ghost danger button may be more appropriate.
106+
actions a user could choose from, then a lower emphasis style like the danger
107+
tertiary button or the danger ghost button may be more appropriate.
108108

109109
<Canvas
110110
of={ButtonStories.Danger}
@@ -116,7 +116,7 @@ danger button or the ghost danger button may be more appropriate.
116116
]}
117117
/>
118118

119-
## Icon-only Buttons
119+
## Icon-only Button
120120

121121
Icon buttons allow users to take actions, and make choices, with a single tap.
122122
Icon buttons can take the form of Primary, Secondary, Tertiary, and Ghost but
@@ -256,7 +256,7 @@ variant, check out the
256256
<Button kind="secondary">Secondary</Button>
257257
<Button kind="tertiary">Tertiary </Button>
258258
<Button kind="danger">Danger</Button>
259-
<Button kind="danger--tertiary">Danger Tertiary</Button>
259+
<Button kind="danger--tertiary">Danger tertiary</Button>
260260
<Button kind="danger--ghost">Danger Ghost</Button>
261261
<Button kind="ghost">Ghost</Button>
262262
</div>
@@ -267,8 +267,8 @@ variant, check out the
267267
<Button kind="secondary">Secondary</Button>
268268
<Button kind="tertiary">Tertiary</Button>
269269
<Button kind="danger">Danger</Button>
270-
<Button kind="danger--tertiary">Danger Tertiary</Button>
271-
<Button kind="danger--ghost">Danger Ghost</Button>
270+
<Button kind="danger--tertiary">Danger tertiary</Button>
271+
<Button kind="danger--ghost">Danger ghost</Button>
272272
<Button kind="ghost">Ghost</Button>
273273
```
274274
@@ -285,7 +285,7 @@ import { Add, TrashCan } from '@carbon/react/icons';
285285
Once the icons are imported, you can pass them directly in to the `Button`
286286
component. Keep in mind, you will also need to add an `iconDescription` to help
287287
with screen-reader support if you use the `renderIcon` prop. If you are trying
288-
to render icon-only buttons, please refer to the section on the
288+
to render an icon-only button, please refer to the section on the
289289
[hasIconOnly](#button-hasicononly) prop
290290

291291
<Unstyled>

packages/react/src/components/Button/Button.stories.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ export const Danger = (args) => {
8787
</Button>
8888
&nbsp;
8989
<Button kind="danger--tertiary" {...args}>
90-
Tertiary Danger Button
90+
Danger tertiary button
9191
</Button>
9292
&nbsp;
9393
<Button kind="danger--ghost" {...args}>
94-
Ghost Danger Button
94+
Danger ghost button
9595
</Button>
9696
</>
9797
);

packages/web-components/src/components/button/button.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,21 @@ import '@carbon/web-components/es/components/button/index.js';
4545
<cds-button href="https://www.ibm.com"> Button </cds-button>
4646
```
4747

48-
## Danger Buttons
48+
## Danger Button
4949

5050
The danger button has three different styles: primary, tertiary, and ghost.
5151
Determining which danger button style to use will depend on the level of
5252
emphasis you want to give to the danger action. Destructive actions that are
5353
considered a required or primary step in a workflow should use the primary
5454
danger button style. However, if a destructive action is just one of several
55-
actions a user could choose from, then a lower emphasis style like the tertiary
56-
danger button or the ghost danger button may be more appropriate.
55+
actions a user could choose from, then a lower emphasis style like the danger
56+
tertiary button or the danger ghost button may be more appropriate.
5757

5858
```html
5959
<cds-button type="danger" href="https://www.ibm.com"> Button </cds-button>
6060
```
6161

62-
## Icon-only Buttons
62+
## Icon-only Button
6363

6464
Icon buttons allow users to take actions, and make choices, with a single tap.
6565
Icon buttons can take the form of any of the seven types (Primary, Secondary,

packages/web-components/src/components/button/button.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export const Danger = {
212212
tooltip-alignment="${tooltipAlignment}"
213213
tooltip-position="${tooltipPosition}"
214214
type="${type}">
215-
Tertiary Danger Button
215+
Danger tertiary button
216216
</cds-button>
217217
<cds-button
218218
button-class-name="${buttonClassName}"
@@ -227,7 +227,7 @@ export const Danger = {
227227
tooltip-alignment="${tooltipAlignment}"
228228
tooltip-position="${tooltipPosition}"
229229
type="${type}">
230-
Ghost Danger Button
230+
Danger ghost button
231231
</cds-button>`,
232232
};
233233

0 commit comments

Comments
 (0)