Skip to content

Commit ea7ebf6

Browse files
committed
Deprecate Modal
1 parent dd8e390 commit ea7ebf6

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/components/feedback/Modal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const noop = () => {};
3636

3737
/**
3838
* Show a modal
39+
* @deprecated - Use `ModalDialog` instead
3940
*/
4041
const ModalNext = function Modal({
4142
children,

src/pattern-library/components/patterns/feedback/ModalPage.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,19 @@ export default function ModalPage() {
103103
</p>
104104
}
105105
>
106+
<Library.Pattern title="Status">
107+
<Library.Changelog>
108+
<Library.ChangelogItem status="deprecated">
109+
This implementation of
110+
<s>
111+
<code>Modal</code>
112+
</s>{' '}
113+
is deprecated. Use
114+
<code>ModalDialog</code> or <code>Dialog</code> instead, which
115+
provide a similar API and enhanced accessibility.
116+
</Library.ChangelogItem>
117+
</Library.Changelog>
118+
</Library.Pattern>
106119
<Library.Pattern title="Usage">
107120
<Library.Usage componentName="Modal" />
108121
<Library.Demo title="Basic modal" withSource>

0 commit comments

Comments
 (0)