Skip to content

Commit 03869fa

Browse files
authored
remove warning and danger Button variants from docs (#1158)
1 parent 6c46a61 commit 03869fa

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

spec/__snapshots__/Storyshots.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3586,7 +3586,7 @@ Array [
35863586
]
35873587
`;
35883588

3589-
exports[`Storyshots Components/Button Danger 1`] = `
3589+
exports[`Storyshots Components/Button Danger DEPRECATED 1`] = `
35903590
Array [
35913591
<button
35923592
className="Button btn btn-danger btn-sm"
@@ -4772,7 +4772,7 @@ Array [
47724772
]
47734773
`;
47744774

4775-
exports[`Storyshots Components/Button Warning 1`] = `
4775+
exports[`Storyshots Components/Button Warning DEPRECATED 1`] = `
47764776
Array [
47774777
<button
47784778
className="Button btn btn-warning btn-sm"

src/Button/Button.mdx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ import * as ComponentStories from './Button.stories';
4444
- Space is limited (e.g. too small for text alone)
4545
- The icon is standardized or represents an object with a strong physical analog or visual attribute (e.g. floppy disk (Save), pencil (Edit))
4646

47+
### Deprecated variants
48+
49+
- The `danger` and `warning` variants are deprecated and will be removed in the next major version.
50+
4751
## Button vs. Link distinction
4852

4953
- Buttons are used for actions that affect the application. Clicking them causes changes on the frontend or backend.
@@ -60,18 +64,6 @@ import * as ComponentStories from './Button.stories';
6064

6165
<Canvas of={ComponentStories.Primary} />
6266

63-
### Danger
64-
65-
- Used to indicate destructive actions.
66-
67-
<Canvas of={ComponentStories.Danger} />
68-
69-
### Warning
70-
71-
- Currently only used for managing project drafts, but could potentially be used to indicate actions that need require special attention.
72-
73-
<Canvas of={ComponentStories.Warning} />
74-
7567
### Transparent
7668

7769
<Canvas of={ComponentStories.Transparent} />

src/Button/Button.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const Primary = () => (
9797
</>
9898
);
9999

100-
export const Danger = () => (
100+
export const DangerDEPRECATED = () => (
101101
<>
102102
<Button
103103
leadingIcon={faFileAlt as IconDefinition}
@@ -173,7 +173,7 @@ export const Danger = () => (
173173
</>
174174
);
175175

176-
export const Warning = () => (
176+
export const WarningDEPRECATED = () => (
177177
<>
178178
<Button
179179
leadingIcon={faFileAlt as IconDefinition}

0 commit comments

Comments
 (0)