Skip to content

Commit 78a342b

Browse files
committed
chore: remove Alert component
1 parent 6aa1a7d commit 78a342b

File tree

9 files changed

+30
-278
lines changed

9 files changed

+30
-278
lines changed

src/alert/alert.module.css

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/alert/alert.stories.mdx

Lines changed: 0 additions & 109 deletions
This file was deleted.

src/alert/alert.test.tsx

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/alert/alert.tsx

Lines changed: 0 additions & 72 deletions
This file was deleted.

src/alert/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export * from './hidden'
1010
export * from './hidden-visually'
1111

1212
// alerts, notifications, etc.
13-
export * from './alert'
1413
export * from './banner'
1514
export * from './loading'
1615
export * from './notice'

stories/components/Dropdown.stories.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react'
22

33
import Button from '../../src/components/deprecated-button'
44
import Dropdown from '../../src/components/deprecated-dropdown'
5-
import { Alert } from '../../src/alert'
5+
import { Banner } from '../../src/banner'
66
import { Stack } from '../../src/stack'
77
import LinkTo from '@storybook/addon-links/react'
88

@@ -18,10 +18,15 @@ export default {
1818
export const DropdownStory = () => (
1919
<section className="story">
2020
<Stack as="section" exceptionallySetClassName="story" space="large">
21-
<Alert tone="critical">
22-
<strong>Deprecated:</strong> While not a 1:1 replacement, consider using{' '}
23-
<LinkTo kind="design-system-menu">Menu</LinkTo> as an alternative
24-
</Alert>
21+
<Banner
22+
tone="error"
23+
description={
24+
<>
25+
<strong>Deprecated:</strong> While not a 1:1 replacement, consider using{' '}
26+
<LinkTo kind="design-system-menu">Menu</LinkTo> as an alternative
27+
</>
28+
}
29+
/>
2530

2631
<Dropdown.Box>
2732
<Dropdown.Trigger>

stories/components/Input.stories.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react'
22

33
import Input from '../../src/components/deprecated-input'
4-
import { Alert } from '../../src/alert'
4+
import { Banner } from '../../src/banner'
55
import './styles/input_story.less'
66
import LinkTo from '@storybook/addon-links/react'
77

@@ -20,10 +20,15 @@ export default {
2020
export const InputStory = () => (
2121
<section className="story">
2222
<div className="story-info">
23-
<Alert tone="critical">
24-
<strong>Deprecated:</strong> Please use{' '}
25-
<LinkTo kind="design-system-textfield">TextField</LinkTo> instead
26-
</Alert>
23+
<Banner
24+
tone="error"
25+
description={
26+
<>
27+
<strong>Deprecated:</strong> Please use{' '}
28+
<LinkTo kind="design-system-textfield">TextField</LinkTo> instead
29+
</>
30+
}
31+
/>
2732
<p>
2833
This component is a dumb wrapper around the
2934
<code> &lt;input /&gt;</code> element which justs add a class name to give it is

stories/components/Select.stories.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react'
22

33
import Select from '../../src/components/deprecated-select'
4-
import { Alert } from '../../src/alert'
4+
import { Banner } from '../../src/banner'
55
import { Stack } from '../../src/stack'
66
import LinkTo from '@storybook/addon-links/react'
77

@@ -31,10 +31,15 @@ export function SelectStory() {
3131

3232
return (
3333
<Stack as="section" exceptionallySetClassName="story" space="large">
34-
<Alert tone="critical">
35-
<strong>Deprecated:</strong> Please use{' '}
36-
<LinkTo kind="design-system-selectfield">SelectField</LinkTo> instead
37-
</Alert>
34+
<Banner
35+
tone="error"
36+
description={
37+
<>
38+
<strong>Deprecated:</strong> Please use{' '}
39+
<LinkTo kind="design-system-selectfield">SelectField</LinkTo> instead
40+
</>
41+
}
42+
/>
3843

3944
<Select value={value} options={options} onChange={setValue} />
4045
</Stack>

0 commit comments

Comments
 (0)