Remove deprecated DialogBackdrop and DialogOverlay components (#3171)

* remove `DialogBackdrop` and `DialogOverlay`

We deprecated those components in v1.6, since they are no longer
documented and this is a major release, we can safely get rid of it.

* update changelog

* migrate playground example to use `Dialog.Panel`
This commit is contained in:
Robin Malfait
2024-05-03 16:22:39 +02:00
committed by GitHub
parent 1ae1af72ab
commit a45cb6ff6a
8 changed files with 9 additions and 467 deletions
+3 -3
View File
@@ -21,8 +21,8 @@ function Nested({ onClose, level = 0 }) {
return (
<>
<Dialog open={true} onClose={onClose} className="fixed inset-0 z-10">
<Dialog.Overlay className="fixed inset-0 bg-gray-500 opacity-25" />
<div
<div className="fixed inset-0 bg-gray-500 opacity-25" />
<Dialog.Panel
className="fixed left-12 top-24 z-10 w-96 bg-white p-4"
style={{
transform: `translate(calc(50px * ${level}), calc(50px * ${level}))`,
@@ -34,7 +34,7 @@ function Nested({ onClose, level = 0 }) {
<Button onClick={() => setShowChild(true)}>Open (2)</Button>
<Button onClick={() => setShowChild(true)}>Open (3)</Button>
</div>
</div>
</Dialog.Panel>
{showChild && <Nested onClose={() => setShowChild(false)} level={level + 1} />}
</Dialog>
</>