Skip to content

Commit

Permalink
Deprecate Modal
Browse files Browse the repository at this point in the history
  • Loading branch information
lyzadanger committed Apr 17, 2023
1 parent dd8e390 commit ea7ebf6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/feedback/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const noop = () => {};

/**
* Show a modal
* @deprecated - Use `ModalDialog` instead
*/
const ModalNext = function Modal({
children,
Expand Down
13 changes: 13 additions & 0 deletions src/pattern-library/components/patterns/feedback/ModalPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,19 @@ export default function ModalPage() {
</p>
}
>
<Library.Pattern title="Status">
<Library.Changelog>
<Library.ChangelogItem status="deprecated">
This implementation of
<s>
<code>Modal</code>
</s>{' '}
is deprecated. Use
<code>ModalDialog</code> or <code>Dialog</code> instead, which
provide a similar API and enhanced accessibility.
</Library.ChangelogItem>
</Library.Changelog>
</Library.Pattern>
<Library.Pattern title="Usage">
<Library.Usage componentName="Modal" />
<Library.Demo title="Basic modal" withSource>
Expand Down

0 comments on commit ea7ebf6

Please sign in to comment.