Skip to content

Commit

Permalink
chore: remove Alert component
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroalves0 committed Dec 26, 2024
1 parent 6aa1a7d commit 78a342b
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 278 deletions.
47 changes: 0 additions & 47 deletions src/alert/alert.module.css

This file was deleted.

109 changes: 0 additions & 109 deletions src/alert/alert.stories.mdx

This file was deleted.

33 changes: 0 additions & 33 deletions src/alert/alert.test.tsx

This file was deleted.

72 changes: 0 additions & 72 deletions src/alert/alert.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/alert/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export * from './hidden'
export * from './hidden-visually'

// alerts, notifications, etc.
export * from './alert'
export * from './banner'
export * from './loading'
export * from './notice'
Expand Down
15 changes: 10 additions & 5 deletions stories/components/Dropdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'

import Button from '../../src/components/deprecated-button'
import Dropdown from '../../src/components/deprecated-dropdown'
import { Alert } from '../../src/alert'
import { Banner } from '../../src/banner'
import { Stack } from '../../src/stack'
import LinkTo from '@storybook/addon-links/react'

Expand All @@ -18,10 +18,15 @@ export default {
export const DropdownStory = () => (
<section className="story">
<Stack as="section" exceptionallySetClassName="story" space="large">
<Alert tone="critical">
<strong>Deprecated:</strong> While not a 1:1 replacement, consider using{' '}
<LinkTo kind="design-system-menu">Menu</LinkTo> as an alternative
</Alert>
<Banner
tone="error"
description={
<>
<strong>Deprecated:</strong> While not a 1:1 replacement, consider using{' '}
<LinkTo kind="design-system-menu">Menu</LinkTo> as an alternative
</>
}
/>

<Dropdown.Box>
<Dropdown.Trigger>
Expand Down
15 changes: 10 additions & 5 deletions stories/components/Input.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'

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

Expand All @@ -20,10 +20,15 @@ export default {
export const InputStory = () => (
<section className="story">
<div className="story-info">
<Alert tone="critical">
<strong>Deprecated:</strong> Please use{' '}
<LinkTo kind="design-system-textfield">TextField</LinkTo> instead
</Alert>
<Banner
tone="error"
description={
<>
<strong>Deprecated:</strong> Please use{' '}
<LinkTo kind="design-system-textfield">TextField</LinkTo> instead
</>
}
/>
<p>
This component is a dumb wrapper around the
<code> &lt;input /&gt;</code> element which justs add a class name to give it is
Expand Down
15 changes: 10 additions & 5 deletions stories/components/Select.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'

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

Expand Down Expand Up @@ -31,10 +31,15 @@ export function SelectStory() {

return (
<Stack as="section" exceptionallySetClassName="story" space="large">
<Alert tone="critical">
<strong>Deprecated:</strong> Please use{' '}
<LinkTo kind="design-system-selectfield">SelectField</LinkTo> instead
</Alert>
<Banner
tone="error"
description={
<>
<strong>Deprecated:</strong> Please use{' '}
<LinkTo kind="design-system-selectfield">SelectField</LinkTo> instead
</>
}
/>

<Select value={value} options={options} onChange={setValue} />
</Stack>
Expand Down

0 comments on commit 78a342b

Please sign in to comment.