diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-colorblind-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-colorblind-linux.png deleted file mode 100644 index 7491948ec9a..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-colorblind-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-colorblind-open-linux.png deleted file mode 100644 index e36b6b5c7a2..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-colorblind-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-dimmed-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-dimmed-linux.png deleted file mode 100644 index 15e6d5852fb..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-dimmed-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-dimmed-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-dimmed-open-linux.png deleted file mode 100644 index bd676876386..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-dimmed-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-high-contrast-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-high-contrast-linux.png deleted file mode 100644 index e4cdc12a1ef..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-high-contrast-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-high-contrast-open-linux.png deleted file mode 100644 index f76d26b24b0..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-high-contrast-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-linux.png deleted file mode 100644 index 7491948ec9a..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-open-linux.png deleted file mode 100644 index 3ab67fb9f55..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-tritanopia-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-tritanopia-linux.png deleted file mode 100644 index 7491948ec9a..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-tritanopia-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-tritanopia-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-tritanopia-open-linux.png deleted file mode 100644 index 3ab67fb9f55..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-dark-tritanopia-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-colorblind-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-colorblind-linux.png deleted file mode 100644 index a0cac7f272b..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-colorblind-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-colorblind-open-linux.png deleted file mode 100644 index f9183dc7602..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-colorblind-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-high-contrast-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-high-contrast-linux.png deleted file mode 100644 index 14c00a9b278..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-high-contrast-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-high-contrast-open-linux.png deleted file mode 100644 index 251f630f4a4..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-high-contrast-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-linux.png deleted file mode 100644 index a0cac7f272b..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-open-linux.png deleted file mode 100644 index a082cfc9e25..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-tritanopia-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-tritanopia-linux.png deleted file mode 100644 index a0cac7f272b..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-tritanopia-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-tritanopia-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-tritanopia-open-linux.png deleted file mode 100644 index a082cfc9e25..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Confirmation-Dialog-light-tritanopia-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-colorblind-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-colorblind-linux.png deleted file mode 100644 index 7491948ec9a..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-colorblind-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-colorblind-open-linux.png deleted file mode 100644 index 54679e020ff..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-colorblind-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-dimmed-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-dimmed-linux.png deleted file mode 100644 index 15e6d5852fb..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-dimmed-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-dimmed-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-dimmed-open-linux.png deleted file mode 100644 index ae452818bf2..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-dimmed-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-high-contrast-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-high-contrast-linux.png deleted file mode 100644 index e4cdc12a1ef..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-high-contrast-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-high-contrast-open-linux.png deleted file mode 100644 index ec45bf5f92e..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-high-contrast-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-linux.png deleted file mode 100644 index 7491948ec9a..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-open-linux.png deleted file mode 100644 index c796266fe2c..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-tritanopia-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-tritanopia-linux.png deleted file mode 100644 index 7491948ec9a..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-tritanopia-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-tritanopia-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-tritanopia-open-linux.png deleted file mode 100644 index d681c8b46cb..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-dark-tritanopia-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-colorblind-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-colorblind-linux.png deleted file mode 100644 index a0cac7f272b..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-colorblind-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-colorblind-open-linux.png deleted file mode 100644 index ca12c0ea3db..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-colorblind-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-high-contrast-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-high-contrast-linux.png deleted file mode 100644 index 14c00a9b278..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-high-contrast-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-high-contrast-open-linux.png deleted file mode 100644 index 68a4d671782..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-high-contrast-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-linux.png deleted file mode 100644 index a0cac7f272b..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-open-linux.png deleted file mode 100644 index e9ec32de38f..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-tritanopia-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-tritanopia-linux.png deleted file mode 100644 index a0cac7f272b..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-tritanopia-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-tritanopia-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-tritanopia-open-linux.png deleted file mode 100644 index 2cddc730547..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Basic-Dialog-light-tritanopia-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-colorblind-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-colorblind-linux.png deleted file mode 100644 index 7491948ec9a..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-colorblind-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-colorblind-open-linux.png deleted file mode 100644 index 52cf69ace23..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-colorblind-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-dimmed-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-dimmed-linux.png deleted file mode 100644 index 15e6d5852fb..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-dimmed-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-dimmed-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-dimmed-open-linux.png deleted file mode 100644 index 39f42ada002..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-dimmed-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-high-contrast-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-high-contrast-linux.png deleted file mode 100644 index e4cdc12a1ef..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-high-contrast-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-high-contrast-open-linux.png deleted file mode 100644 index c136e00cc79..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-high-contrast-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-linux.png deleted file mode 100644 index 7491948ec9a..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-open-linux.png deleted file mode 100644 index 52cf69ace23..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-tritanopia-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-tritanopia-linux.png deleted file mode 100644 index 7491948ec9a..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-tritanopia-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-tritanopia-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-tritanopia-open-linux.png deleted file mode 100644 index 52cf69ace23..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-dark-tritanopia-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-colorblind-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-colorblind-linux.png deleted file mode 100644 index a0cac7f272b..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-colorblind-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-colorblind-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-colorblind-open-linux.png deleted file mode 100644 index 06482d06421..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-colorblind-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-high-contrast-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-high-contrast-linux.png deleted file mode 100644 index 14c00a9b278..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-high-contrast-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-high-contrast-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-high-contrast-open-linux.png deleted file mode 100644 index 050ed0b3a66..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-high-contrast-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-linux.png deleted file mode 100644 index a0cac7f272b..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-open-linux.png deleted file mode 100644 index 06482d06421..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-open-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-tritanopia-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-tritanopia-linux.png deleted file mode 100644 index a0cac7f272b..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-tritanopia-linux.png and /dev/null differ diff --git a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-tritanopia-open-linux.png b/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-tritanopia-open-linux.png deleted file mode 100644 index 06482d06421..00000000000 Binary files a/.playwright/snapshots/components/DialogV2.test.ts-snapshots/DialogV2-Default-light-tritanopia-open-linux.png and /dev/null differ diff --git a/docs/content/drafts/Dialog2.mdx b/docs/content/drafts/Dialog.mdx similarity index 97% rename from docs/content/drafts/Dialog2.mdx rename to docs/content/drafts/Dialog.mdx index 0d89fa0e764..3db183706d0 100644 --- a/docs/content/drafts/Dialog2.mdx +++ b/docs/content/drafts/Dialog.mdx @@ -1,14 +1,10 @@ --- title: Dialog v2 -componentId: dialog_2 +componentId: dialog status: Draft -a11yReviewed: false -description: Use an underlined nav to allow tab like navigation with overflow behaviour in your UI. -source: https://github.com/primer/react/tree/main/src/Dialog2 -storybook: '/react/storybook/?path=/story/drafts-components-dialog--default' --- -import data from '../../../src/Dialog2/Dialog.docs.json' +import data from '../../../src/Dialog/Dialog.docs.json' ```js import {Dialog} from '@primer/react/drafts' diff --git a/docs/src/@primer/gatsby-theme-doctocat/nav.yml b/docs/src/@primer/gatsby-theme-doctocat/nav.yml index 82605d53b56..da1d837ce2b 100644 --- a/docs/src/@primer/gatsby-theme-doctocat/nav.yml +++ b/docs/src/@primer/gatsby-theme-doctocat/nav.yml @@ -159,7 +159,7 @@ - title: Drafts children: - title: Dialog v2 - url: /drafts/Dialog2 + url: /drafts/Dialog - title: InlineAutocomplete url: /drafts/InlineAutocomplete - title: MarkdownEditor diff --git a/e2e/components/DialogV2.test.ts b/e2e/components/DialogV2.test.ts deleted file mode 100644 index f982ba9e610..00000000000 --- a/e2e/components/DialogV2.test.ts +++ /dev/null @@ -1,131 +0,0 @@ -import {test, expect} from '@playwright/test' -import {visit} from '../test-helpers/storybook' -import {themes} from '../test-helpers/themes' - -test.describe('DialogV2', () => { - test.describe('Default', () => { - for (const theme of themes) { - test.describe(theme, () => { - test('default @vrt', async ({page}) => { - await visit(page, { - id: 'drafts-components-dialog--default', - globals: { - colorScheme: theme, - }, - }) - - // Default state - expect( - await page.screenshot({ - animations: 'disabled', - }), - ).toMatchSnapshot(`DialogV2.Default.${theme}.png`) - // Open Dialog - await page.getByRole('button', {name: 'Show dialog'}).click() - // wait for dialog to open - await page.getByRole('dialog', {name: 'Dialog'}).waitFor() - // Open state - expect( - await page.screenshot({ - animations: 'disabled', - }), - ).toMatchSnapshot(`DialogV2.Default.${theme}.open.png`) - }) - - test('axe @aat', async ({page}) => { - await visit(page, { - id: 'drafts-components-dialog--default', - globals: { - colorScheme: theme, - }, - }) - await expect(page).toHaveNoViolations() - }) - }) - } - }) - - test.describe('Basic Dialog', () => { - for (const theme of themes) { - test.describe(theme, () => { - test('default @vrt', async ({page}) => { - await visit(page, { - id: 'drafts-components-dialog-features--basic-dialog', - globals: { - colorScheme: theme, - }, - }) - - // Default state - expect( - await page.screenshot({ - animations: 'disabled', - }), - ).toMatchSnapshot(`DialogV2.Basic Dialog.${theme}.png`) - // Open Dialog - await page.getByRole('button', {name: 'Show dialog'}).click() - // wait for dialog to open - await page.getByRole('dialog', {name: 'Dialog'}).waitFor() - // Open state - expect( - await page.screenshot({ - animations: 'disabled', - }), - ).toMatchSnapshot(`DialogV2.Basic Dialog.${theme}.open.png`) - }) - - test('axe @aat', async ({page}) => { - await visit(page, { - id: 'drafts-components-dialog-features--basic-dialog', - globals: { - colorScheme: theme, - }, - }) - await expect(page).toHaveNoViolations() - }) - }) - } - }) - - test.describe('Basic Confirmation Dialog', () => { - for (const theme of themes) { - test.describe(theme, () => { - test('default @vrt', async ({page}) => { - await visit(page, { - id: 'drafts-components-dialog-features--basic-confirmation-dialog', - globals: { - colorScheme: theme, - }, - }) - - // Default state - expect( - await page.screenshot({ - animations: 'disabled', - }), - ).toMatchSnapshot(`DialogV2.Basic Confirmation Dialog.${theme}.png`) - // Open Dialog - await page.getByRole('button', {name: 'Show dialog'}).click() - // wait for dialog to open - await page.getByRole('alertdialog').waitFor() - // Open state - expect( - await page.screenshot({ - animations: 'disabled', - }), - ).toMatchSnapshot(`DialogV2.Basic Confirmation Dialog.${theme}.open.png`) - }) - - test('axe @aat', async ({page}) => { - await visit(page, { - id: 'drafts-components-dialog-features--basic-confirmation-dialog', - globals: { - colorScheme: theme, - }, - }) - await expect(page).toHaveNoViolations() - }) - }) - } - }) -}) diff --git a/generated/components.json b/generated/components.json index 7ef8190e000..33808f80b37 100644 --- a/generated/components.json +++ b/generated/components.json @@ -2112,12 +2112,7 @@ "name": "Dialog", "status": "draft", "a11yReviewed": false, - "stories": [ - { - "id": "components-dialog--default", - "code": "() => {\n const [isOpen, setIsOpen] = useState(false)\n const buttonRef = useRef(null)\n const onDialogClose = useCallback(() => setIsOpen(false), [])\n return (\n <>\n \n {isOpen && Dialog Content}\n \n )\n}" - } - ], + "stories": [], "props": [ { "name": "title", diff --git a/script/generate-e2e-tests.js b/script/generate-e2e-tests.js index 3338f7a9fab..d7372e486c5 100644 --- a/script/generate-e2e-tests.js +++ b/script/generate-e2e-tests.js @@ -336,25 +336,6 @@ const components = new Map([ ], }, ], - [ - 'DialogV2', - { - stories: [ - { - id: 'drafts-components-dialog--default', - name: 'Default', - }, - { - id: 'drafts-components-dialog-features--basic-dialog', - name: 'Basic Dialog', - }, - { - id: 'drafts-components-dialog-features--basic-confirmation-dialog', - name: 'Basic Confirmation Dialog', - }, - ], - }, - ], [ 'Flash', { diff --git a/src/Dialog2/ConfirmationDialog.tsx b/src/Dialog/ConfirmationDialog.tsx similarity index 99% rename from src/Dialog2/ConfirmationDialog.tsx rename to src/Dialog/ConfirmationDialog.tsx index a4fcfaa09b9..2fa2259849e 100644 --- a/src/Dialog2/ConfirmationDialog.tsx +++ b/src/Dialog/ConfirmationDialog.tsx @@ -5,7 +5,7 @@ import Box from '../Box' import {ThemeProvider, useTheme, ThemeProviderProps} from '../ThemeProvider' import {FocusKeys} from '@primer/behaviors' import {get} from '../constants' -import {Dialog, DialogProps, DialogHeaderProps, DialogButtonProps} from './Dialog' +import {Dialog, DialogProps, DialogHeaderProps, DialogButtonProps} from '../Dialog/Dialog' import {useFocusZone} from '../hooks/useFocusZone' /** diff --git a/src/Dialog2/Dialog.docs.json b/src/Dialog/Dialog.docs.json similarity index 100% rename from src/Dialog2/Dialog.docs.json rename to src/Dialog/Dialog.docs.json diff --git a/src/Dialog2/Dialog.tsx b/src/Dialog/Dialog.tsx similarity index 100% rename from src/Dialog2/Dialog.tsx rename to src/Dialog/Dialog.tsx diff --git a/src/Dialog2/Dialog.stories.tsx b/src/Dialog2/Dialog.stories.tsx deleted file mode 100644 index b3a206f2e6e..00000000000 --- a/src/Dialog2/Dialog.stories.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import React, {useState, useRef, useCallback} from 'react' -import {Meta} from '@storybook/react' - -import {BaseStyles, ThemeProvider} from '..' -import {Button} from '../Button' -import {Dialog} from './Dialog' - -export default { - title: 'Drafts/Components/Dialog', - component: Dialog, - decorators: [ - Story => { - // Since portal roots are registered globally, we need this line so that each storybook - // story works in isolation. - return ( - - - - - - ) - }, - ], -} as Meta - -export const Default = () => { - const [isOpen, setIsOpen] = useState(false) - const buttonRef = useRef(null) - const onDialogClose = useCallback(() => setIsOpen(false), []) - - return ( - <> - - {isOpen && Dialog Content} - - ) -} diff --git a/src/Dialog2/index.ts b/src/Dialog2/index.ts deleted file mode 100644 index 8390808a2a1..00000000000 --- a/src/Dialog2/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './Dialog' diff --git a/src/TreeView/TreeView.tsx b/src/TreeView/TreeView.tsx index 9ddca3cc74b..d70195cfa90 100644 --- a/src/TreeView/TreeView.tsx +++ b/src/TreeView/TreeView.tsx @@ -8,7 +8,7 @@ import classnames from 'classnames' import React from 'react' import styled, {keyframes} from 'styled-components' import {get} from '../constants' -import {ConfirmationDialog} from '../Dialog2/ConfirmationDialog' +import {ConfirmationDialog} from '../Dialog/ConfirmationDialog' import {useControllableState} from '../hooks/useControllableState' import {useId} from '../hooks/useId' import useSafeTimeout from '../hooks/useSafeTimeout' diff --git a/src/Dialog2/__tests__/ConfirmationDialog.test.tsx b/src/__tests__/ConfirmationDialog.test.tsx similarity index 88% rename from src/Dialog2/__tests__/ConfirmationDialog.test.tsx rename to src/__tests__/ConfirmationDialog.test.tsx index 82c9fb48055..715614d4ba0 100644 --- a/src/Dialog2/__tests__/ConfirmationDialog.test.tsx +++ b/src/__tests__/ConfirmationDialog.test.tsx @@ -2,15 +2,15 @@ import {render as HTMLRender, act, fireEvent} from '@testing-library/react' import {axe} from 'jest-axe' import React, {useCallback, useRef, useState} from 'react' -import {ActionMenu} from '../../deprecated/ActionMenu' -import BaseStyles from '../../BaseStyles' -import Box from '../../Box' -import Button from '../../deprecated/Button/Button' -import {ConfirmationDialog, useConfirm} from '../ConfirmationDialog' -import theme from '../../theme' -import {ThemeProvider} from '../../ThemeProvider' -import {SSRProvider} from '../../utils/ssr' -import {behavesAsComponent, checkExports} from '../../utils/testing' +import {ActionMenu} from '../deprecated/ActionMenu' +import BaseStyles from '../BaseStyles' +import Box from '../Box' +import Button from '../deprecated/Button/Button' +import {ConfirmationDialog, useConfirm} from '../Dialog/ConfirmationDialog' +import theme from '../theme' +import {ThemeProvider} from '../ThemeProvider' +import {SSRProvider} from '../utils/ssr' +import {behavesAsComponent, checkExports} from '../utils/testing' declare const REACT_VERSION_LATEST: boolean @@ -80,7 +80,7 @@ describe('ConfirmationDialog', () => { options: {skipAs: true, skipSx: true}, }) - checkExports('Dialog2/ConfirmationDialog', { + checkExports('Dialog/ConfirmationDialog', { default: undefined, useConfirm, ConfirmationDialog, @@ -140,7 +140,9 @@ describe('ConfirmationDialog', () => { // REACT_VERSION_LATEST should be treated as a constant for the test // environment if (REACT_VERSION_LATEST) { + // eslint-disable-next-line jest/no-conditional-expect expect(spy).toHaveBeenCalledTimes(1) + // eslint-disable-next-line jest/no-conditional-expect expect(spy).toHaveBeenCalledWith( expect.stringContaining('Warning: ReactDOM.render is no longer supported in React 18'), ) diff --git a/src/Dialog2/__tests__/Dialog.types.test.tsx b/src/__tests__/Dialog2.types.test.tsx similarity index 87% rename from src/Dialog2/__tests__/Dialog.types.test.tsx rename to src/__tests__/Dialog2.types.test.tsx index 591ccb74a05..a5774427458 100644 --- a/src/Dialog2/__tests__/Dialog.types.test.tsx +++ b/src/__tests__/Dialog2.types.test.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {Dialog} from '../Dialog' +import {Dialog} from '../Dialog/Dialog' export function shouldAcceptCallWithNoProps() { return null} /> diff --git a/src/Dialog2/__tests__/__snapshots__/ConfirmationDialog.test.tsx.snap b/src/__tests__/__snapshots__/ConfirmationDialog.test.tsx.snap similarity index 100% rename from src/Dialog2/__tests__/__snapshots__/ConfirmationDialog.test.tsx.snap rename to src/__tests__/__snapshots__/ConfirmationDialog.test.tsx.snap diff --git a/src/__tests__/storybook.test.tsx b/src/__tests__/storybook.test.tsx index c6dd90c64bd..a19118036da 100644 --- a/src/__tests__/storybook.test.tsx +++ b/src/__tests__/storybook.test.tsx @@ -21,7 +21,6 @@ const allowlist = [ 'CounterLabel', 'DataTable', 'Details', - 'Dialog2', 'Flash', 'Heading', 'IconButton', diff --git a/src/drafts/index.ts b/src/drafts/index.ts index 7b901fafd90..95ae3d8a365 100644 --- a/src/drafts/index.ts +++ b/src/drafts/index.ts @@ -21,7 +21,7 @@ export type { TableActionsProps, } from '../DataTable' -export * from '../Dialog2' +export * from '../Dialog/Dialog' export {default as InlineAutocomplete} from './InlineAutocomplete' export type { diff --git a/src/index.ts b/src/index.ts index 7b81df893d1..e6b83b39a2a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -34,7 +34,7 @@ export type {TouchOrMouseEvent} from './hooks/useOnOutsideClick' export {useOpenAndCloseFocus} from './hooks/useOpenAndCloseFocus' export {useOnEscapePress} from './hooks/useOnEscapePress' export {useOverlay} from './hooks/useOverlay' -export {useConfirm} from './Dialog2/ConfirmationDialog' +export {useConfirm} from './Dialog/ConfirmationDialog' export {useFocusTrap} from './hooks/useFocusTrap' export type {FocusTrapHookSettings} from './hooks/useFocusTrap' export {useFocusZone} from './hooks/useFocusZone' @@ -87,8 +87,8 @@ export {default as Details} from './Details' export type {DetailsProps} from './Details' export {default as Dialog} from './Dialog' export type {DialogProps, DialogHeaderProps} from './Dialog' -export type {ConfirmationDialogProps} from './Dialog2/ConfirmationDialog' -export {ConfirmationDialog} from './Dialog2/ConfirmationDialog' +export type {ConfirmationDialogProps} from './Dialog/ConfirmationDialog' +export {ConfirmationDialog} from './Dialog/ConfirmationDialog' export {default as FilteredSearch} from './FilteredSearch' export type {FilteredSearchProps} from './FilteredSearch' export {default as FilterList} from './FilterList' diff --git a/src/stories/ConfirmationDialog.stories.tsx b/src/stories/ConfirmationDialog.stories.tsx new file mode 100644 index 00000000000..6f5668a4b32 --- /dev/null +++ b/src/stories/ConfirmationDialog.stories.tsx @@ -0,0 +1,106 @@ +import React, {useState, useRef, useCallback} from 'react' +import {Meta} from '@storybook/react' +import {BaseStyles, Box, ThemeProvider, useTheme} from '..' +import {Button} from '../Button' +import {ActionMenu} from '../ActionMenu' +import {ActionList} from '../ActionList' +import {ConfirmationDialog, useConfirm} from '../Dialog/ConfirmationDialog' + +export default { + title: 'Components/ConfirmationDialog', + component: ConfirmationDialog, + decorators: [ + Story => { + // Since portal roots are registered globally, we need this line so that each storybook + // story works in isolation. + return ( + + + + + + ) + }, + ], +} as Meta + +export const BasicConfirmationDialog = () => { + const [isOpen, setIsOpen] = useState(false) + const buttonRef = useRef(null) + const onDialogClose = useCallback(() => setIsOpen(false), []) + return ( + <> + + {isOpen && ( + + Deleting the universe could have disastrous effects, including but not limited to destroying all life on + Earth. + + )} + + ) +} + +export const ShorthandHook = () => { + const confirm = useConfirm() + const {theme} = useTheme() + const onButtonClick = useCallback( + async (event: React.MouseEvent) => { + if ( + (await confirm({title: 'Are you sure?', content: 'Do you really want to turn this button green?'})) && + event.target instanceof HTMLElement + ) { + event.target.style.color = theme?.colors.success.fg ?? 'green' + event.target.textContent = "I'm green!" + } + }, + [confirm, theme], + ) + return ( + + + + + + + ) +} + +export const ShorthandHookFromActionMenu = () => { + const confirm = useConfirm() + const [text, setText] = useState('open me') + const onButtonClick = useCallback(async () => { + if (await confirm({title: 'Are you sure?', content: 'Do you really want to do a trick?'})) { + setText('tada!') + } + }, [confirm]) + + return ( + + + {text} + + + + Do a trick! + + + + + ) +} diff --git a/src/Dialog2/Dialog.features.stories.tsx b/src/stories/Dialog.stories.tsx similarity index 71% rename from src/Dialog2/Dialog.features.stories.tsx rename to src/stories/Dialog.stories.tsx index 6af68cdc7ab..9dab6838f5a 100644 --- a/src/Dialog2/Dialog.features.stories.tsx +++ b/src/stories/Dialog.stories.tsx @@ -1,15 +1,12 @@ import React, {useState, useRef, useCallback} from 'react' import {Meta} from '@storybook/react' -import {BaseStyles, ThemeProvider, Box, useTheme} from '..' -import {Button} from '../Button' -import {ActionMenu} from '../ActionMenu' -import {ActionList} from '../ActionList' -import {ConfirmationDialog, useConfirm} from './ConfirmationDialog' -import {Dialog, DialogProps, DialogWidth, DialogHeight} from './Dialog' +import {BaseStyles, ThemeProvider, Box} from '..' +import {Button} from '../Button' +import {Dialog, DialogProps, DialogWidth, DialogHeight} from '../Dialog/Dialog' export default { - title: 'Drafts/Components/Dialog/Features', + title: 'Components/Dialog', component: Dialog, decorators: [ Story => { @@ -108,43 +105,6 @@ interface DialogStoryProps { height: DialogHeight subtitle: boolean } - -function CustomHeader({ - title, - subtitle, - dialogLabelId, - dialogDescriptionId, - onClose, -}: React.PropsWithChildren) { - const onCloseClick = useCallback(() => { - onClose('close-button') - }, [onClose]) - if (typeof title === 'string' && typeof subtitle === 'string') { - return ( - - - -

{title}

- {subtitle &&

{subtitle}

} -
- -
-
- ) - } - return null -} -function CustomBody({children}: React.PropsWithChildren) { - return {children} -} -function CustomFooter({footerButtons}: React.PropsWithChildren) { - return ( - - {footerButtons ? : null} - - ) -} - export const BasicDialog = ({width, height, subtitle}: DialogStoryProps) => { const [isOpen, setIsOpen] = useState(false) const [secondOpen, setSecondOpen] = useState(false) @@ -180,7 +140,39 @@ export const BasicDialog = ({width, height, subtitle}: DialogStoryProps) => { ) } -export const DialogWithCustomRenderers = ({width, height, subtitle}: DialogStoryProps) => { + +function CustomHeader({ + title, + subtitle, + dialogLabelId, + dialogDescriptionId, + onClose, +}: React.PropsWithChildren) { + const onCloseClick = useCallback(() => { + onClose('close-button') + }, [onClose]) + if (typeof title === 'string' && typeof subtitle === 'string') { + return ( + +

{title.toUpperCase()}

+

{subtitle.toLowerCase()}

+ +
+ ) + } + return null +} +function CustomBody({children}: React.PropsWithChildren) { + return {children} +} +function CustomFooter({footerButtons}: React.PropsWithChildren) { + return ( + + {footerButtons ? : null} + + ) +} +export const WithCustomRenderers = ({width, height, subtitle}: DialogStoryProps) => { const [isOpen, setIsOpen] = useState(false) const onDialogClose = useCallback(() => setIsOpen(false), []) return ( @@ -208,7 +200,7 @@ export const DialogWithCustomRenderers = ({width, height, subtitle}: DialogStory ) } -export const DialogWithStressTest = ({width, height, subtitle}: DialogStoryProps) => { +export const StressTest = ({width, height, subtitle}: DialogStoryProps) => { const [isOpen, setIsOpen] = useState(false) const [secondOpen, setSecondOpen] = useState(false) const buttonRef = useRef(null) @@ -249,84 +241,3 @@ export const DialogWithStressTest = ({width, height, subtitle}: DialogStoryProps ) } - -export const BasicConfirmationDialog = () => { - const [isOpen, setIsOpen] = useState(false) - const buttonRef = useRef(null) - const onDialogClose = useCallback(() => setIsOpen(false), []) - return ( - <> - - {isOpen && ( - - Deleting the universe could have disastrous effects, including but not limited to destroying all life on - Earth. - - )} - - ) -} - -export const ConfirmationDialogWithShorthandHook = () => { - const confirm = useConfirm() - const {theme} = useTheme() - const onButtonClick = useCallback( - async (event: React.MouseEvent) => { - if ( - (await confirm({title: 'Are you sure?', content: 'Do you really want to turn this button green?'})) && - event.target instanceof HTMLElement - ) { - event.target.style.color = theme?.colors.success.fg ?? 'green' - event.target.textContent = "I'm green!" - } - }, - [confirm, theme], - ) - return ( - - - - - - - ) -} - -export const ConfirmationDialogWithShorthandHookFromActionMenu = () => { - const confirm = useConfirm() - const [text, setText] = useState('open me') - const onButtonClick = useCallback(async () => { - if (await confirm({title: 'Are you sure?', content: 'Do you really want to do a trick?'})) { - setText('tada!') - } - }, [confirm]) - - return ( - - - {text} - - - - Do a trick! - - - - - ) -}