From 325a5a0da76191d5deba65aaefa5ebaedaf09ee9 Mon Sep 17 00:00:00 2001 From: Danny White <3104761+dnywh@users.noreply.github.com> Date: Mon, 12 Oct 2026 10:18:45 +1100 Subject: [PATCH] fix(studio): polish extension installation dialogs (#51463) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem The enable-extension dialog in #51440 needs clearer installation copy and a consistent disclosure for custom-schema guidance. On narrow screens, footer buttons touch and dialog content can scroll sideways. ## Solution Polish the dialog on top of #51440: - Explain fixed-schema requirements and hide custom-schema guidance when the extension requires a specific schema. - Share the disclosure interaction with the session-expired and API-hardening dialogs through `ui-patterns/DialogDisclosure`, documented with a live design-system example. - Fix narrow-screen overflow and add vertical spacing to shared dialog footers. - Refine inline-code styling and update the PostGIS instructions and E2E button locator. | After | | --- | | CleanShot 2026-10-09 at 12 17
47@2x | | _Standard extension_ | | 52254 | | _Standard extension expanded accordion_ | | CleanShot 2026-10-09 at 12 20
04@2x | | _Extension with fixed schema_ | ## Review instructions 1. Open `/project//database/extensions`. Turn on the toggle for a disabled `postgres_fdw` extension. Expand **Install in a different schema** and check its hover, keyboard focus and full-width click target. Repeat with `pg_cron` or `pgmq`: the intro must say **must**, and custom-schema guidance must be absent. Cancel without enabling. 2. At 320 px and 375 px, check the extension dialog's alignment, inline-code rendering, wrapped SQL and stacked **Enable** / **Cancel** spacing. Confirm the page does not scroll sideways. 3. On a platform project with the Data API enabled, open `/project//integrations/data_api/settings`. Under **Harden Data API**, click **Harden Data API**. Expand both sections and check the same trigger behaviour. Confirm completed sections still show their check icons. Close without applying either action. 4. The session-expired dialog has no direct route. It is rendered by `apps/studio/hooks/misc/withAuth.tsx` after authentication loading exceeds 10 seconds. For repeatable local review, temporarily pass `visible={true}` to its `SessionTimeoutModal` callsite, then open `/projects`. Expand **Having trouble?** by clicking the text or chevron and using Enter / Space. Check the help text and controls. Close the dialog without signing out or clearing site data, then undo the temporary prop change. 5. In the design system, open [`/docs/components/dialog#optional-details`](https://design-system-git-dnywh-choreextension-dialog-polish-supabase.vercel.app/design-system/docs/components/dialog#optional-details). Click **Export results**, then expand **What’s included** with the mouse and keyboard. The demo imports the same `ui-patterns/DialogDisclosure` used by Studio. 6. Open another dialog and an alert dialog at a narrow width. Check the shared 8 px gap between stacked footer buttons. Review inline-code examples on `/docs/components/typography` for the shared styling change. --- apps/design-system/config/docs.ts | 5 - .../content/docs/components/alert.mdx | 2 +- .../content/docs/components/collapsible.mdx | 2 +- .../content/docs/components/dialog.mdx | 8 ++ .../content/docs/fragments/admonition.mdx | 2 +- .../docs/fragments/collapsible-alert.mdx | 43 --------- .../example/collapsible-alert-demo.tsx | 11 --- .../example/dialog-disclosure-demo.tsx | 64 +++++++++++++ apps/design-system/registry/examples.ts | 12 +-- .../guides/database/extensions/postgis.mdx | 2 +- .../Extensions/EnableExtensionModal.tsx | 92 +++++++++++-------- .../Settings/API/HardenAPIModal.tsx | 70 +++++++------- .../interfaces/SignIn/SessionTimeoutModal.tsx | 86 +++++++++-------- e2e/studio/features/database.spec.ts | 4 +- packages/config/typography.css | 2 +- packages/ui-patterns/package.json | 8 +- packages/ui-patterns/src/DialogDisclosure.tsx | 47 ++++++++++ .../ui-patterns/src/collapsible-alert.tsx | 46 ---------- .../src/components/shadcn/ui/alert-dialog.tsx | 8 +- .../ui/src/components/shadcn/ui/dialog.tsx | 8 +- 20 files changed, 273 insertions(+), 249 deletions(-) delete mode 100644 apps/design-system/content/docs/fragments/collapsible-alert.mdx delete mode 100644 apps/design-system/registry/default/example/collapsible-alert-demo.tsx create mode 100644 apps/design-system/registry/default/example/dialog-disclosure-demo.tsx create mode 100644 packages/ui-patterns/src/DialogDisclosure.tsx delete mode 100644 packages/ui-patterns/src/collapsible-alert.tsx diff --git a/apps/design-system/config/docs.ts b/apps/design-system/config/docs.ts index 4ad98ae7c13..ee67195a54a 100644 --- a/apps/design-system/config/docs.ts +++ b/apps/design-system/config/docs.ts @@ -127,11 +127,6 @@ export const docsConfig: DocsConfig = { href: '/docs/fragments/admonition', items: [], }, - { - title: 'Collapsible Alert', - href: '/docs/fragments/collapsible-alert', - items: [], - }, { title: 'Collapsible Card Section', href: '/docs/fragments/collapsible-card-section', diff --git a/apps/design-system/content/docs/components/alert.mdx b/apps/design-system/content/docs/components/alert.mdx index f688e7e79c4..d522e8c45fa 100644 --- a/apps/design-system/content/docs/components/alert.mdx +++ b/apps/design-system/content/docs/components/alert.mdx @@ -11,7 +11,7 @@ Alert is the low-level shadcn primitive that forms the foundation for [Admonitio Examples where Alert may be appropriate include bespoke icons, custom internal layouts, or wrapper components that need direct access to `alertVariants`. -Use [Collapsible Alert](../fragments/collapsible-alert) when a callout also needs expandable detail. Use [Collapsible](./collapsible) only for generic disclosure behaviour that is not itself an alert. +Compose Alert with [Collapsible](./collapsible) when a callout needs expandable detail. Use [DialogDisclosure](./dialog#optional-details) for optional details in a dialog. diff --git a/apps/design-system/content/docs/components/collapsible.mdx b/apps/design-system/content/docs/components/collapsible.mdx index 3b6b31bd1ff..bbe61f9ddb2 100644 --- a/apps/design-system/content/docs/components/collapsible.mdx +++ b/apps/design-system/content/docs/components/collapsible.mdx @@ -6,7 +6,7 @@ component: true Collapsible is a low-level primitive for revealing and hiding related content. Use it when a component needs custom trigger or content composition. -Use Collapsible for generic disclosure behaviour: rows, sections, menus, tool details, and custom layouts. Use [Collapsible Alert](../fragments/collapsible-alert) instead when the disclosure is an alert-styled callout that should keep standard alert padding, variants, trigger styling, and toggle treatment. +Use Collapsible for generic disclosure behavior: rows, sections, menus, tool details, and custom layouts. Use [DialogDisclosure](./dialog#optional-details) for optional details in a dialog. diff --git a/apps/design-system/content/docs/components/dialog.mdx b/apps/design-system/content/docs/components/dialog.mdx index 3dffe213230..e95002e1b28 100644 --- a/apps/design-system/content/docs/components/dialog.mdx +++ b/apps/design-system/content/docs/components/dialog.mdx @@ -65,6 +65,14 @@ import { ## Examples +### Optional details + +Use `DialogDisclosure` to reveal optional help or context inside a dialog. Put the trigger in the dialog body above the footer, and add a section separator when the disclosure follows other content. Keep the primary action visible while the details are open or closed. + +`Collapsible` provides the open and closed state. `DialogDisclosure` adds the trigger and content presentation used in dialogs. Use `Accordion` when several related sections each need a heading and expandable content. + + + ### Custom close button diff --git a/apps/design-system/content/docs/fragments/admonition.mdx b/apps/design-system/content/docs/fragments/admonition.mdx index 8e5752ca4b2..087ca0ed3bd 100644 --- a/apps/design-system/content/docs/fragments/admonition.mdx +++ b/apps/design-system/content/docs/fragments/admonition.mdx @@ -15,7 +15,7 @@ Admonition provides the standard product callout pattern for situations that req Use Admonition instead of the low-level [Alert](../components/alert) primitive unless you specifically need custom composition. If in doubt, stick with Admonition. -Use [Collapsible Alert](./collapsible-alert) when the callout needs to remain visible while optional detail can be expanded. Use [Collapsible](../components/collapsible) for generic disclosure behaviour that is not itself a callout. +Use [Collapsible](../components/collapsible) for custom expandable content. Use [DialogDisclosure](../components/dialog#optional-details) for optional details in a dialog. Use `title` for the heading slot when the callout needs its own heading. `title` is optional: short callouts may use `description` without a title when nearby content already provides enough context. diff --git a/apps/design-system/content/docs/fragments/collapsible-alert.mdx b/apps/design-system/content/docs/fragments/collapsible-alert.mdx deleted file mode 100644 index 5cae9a4934f..00000000000 --- a/apps/design-system/content/docs/fragments/collapsible-alert.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Collapsible Alert -description: An alert-styled block with a collapsible content section, toggled by an icon button. -fragment: true ---- - -Collapsible Alert combines an Alert-style container with a collapsible content section. Use it when the callout itself needs to stay visible while optional detail can be expanded. - -Use Collapsible Alert when the disclosure is itself a callout. It owns the alert styling, padding, trigger treatment, and toggle button. Use [Collapsible](../components/collapsible) instead when you only need generic reveal and hide behaviour and the surrounding layout is not an alert. - -For non-expandable product callouts, use [Admonition](./admonition). Use the low-level [Alert](../components/alert) primitive only when a wrapper or bespoke composition needs direct control over the alert structure. - - - -## Usage - -```tsx -import { CollapsibleAlert } from 'ui-patterns/collapsible-alert' -``` - -```tsx - -

Content revealed when expanded.

-
-``` - -### Default open - -```tsx - -

This section is expanded by default.

-
-``` - -### Variants - -Supports the same `variant` prop as Alert: `default`, `destructive`, and `warning`. - -```tsx - -

Something needs attention.

-
-``` diff --git a/apps/design-system/registry/default/example/collapsible-alert-demo.tsx b/apps/design-system/registry/default/example/collapsible-alert-demo.tsx deleted file mode 100644 index 96cb3e30324..00000000000 --- a/apps/design-system/registry/default/example/collapsible-alert-demo.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { CollapsibleAlert } from 'ui-patterns/collapsible-alert' - -export default function CollapsibleAlertDemo() { - return ( - -

- Try a different browser or disable extensions that block network requests. -

-
- ) -} diff --git a/apps/design-system/registry/default/example/dialog-disclosure-demo.tsx b/apps/design-system/registry/default/example/dialog-disclosure-demo.tsx new file mode 100644 index 00000000000..a69bd06fbed --- /dev/null +++ b/apps/design-system/registry/default/example/dialog-disclosure-demo.tsx @@ -0,0 +1,64 @@ +import { + Button, + Dialog, + DialogClose, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogSection, + DialogSectionSeparator, + DialogTitle, + DialogTrigger, +} from 'ui' +import { + DialogDisclosure, + DialogDisclosureContent, + DialogDisclosureTrigger, +} from 'ui-patterns/DialogDisclosure' + +export default function DialogDisclosureDemo() { + return ( + + + + + + + Export results + + + +

+ All 250 rows will be downloaded as a CSV file. +

+
+ + + + What’s included + + + +

The file includes column names in the first row, followed by the query results.

+
    +
  • Columns keep the same order as the results table.
  • +
  • Empty fields represent null values.
  • +
  • Values containing commas or line breaks are enclosed in double quotes.
  • +
+

Open the file in a spreadsheet or import it into another tool.

+
+
+
+ + + + + + + + +
+
+ ) +} diff --git a/apps/design-system/registry/examples.ts b/apps/design-system/registry/examples.ts index dc2f26e11be..39a2d0bb327 100644 --- a/apps/design-system/registry/examples.ts +++ b/apps/design-system/registry/examples.ts @@ -67,12 +67,6 @@ export const examples: Registry = [ registryDependencies: ['alert'], files: ['example/alert-demo.tsx'], }, - { - name: 'collapsible-alert-demo', - type: 'components:example', - registryDependencies: ['collapsible-alert'], - files: ['example/collapsible-alert-demo.tsx'], - }, { name: 'collapsible-card-section-demo', type: 'components:example', @@ -551,6 +545,12 @@ export const examples: Registry = [ registryDependencies: ['dialog'], files: ['example/dialog-demo.tsx'], }, + { + name: 'dialog-disclosure-demo', + type: 'components:example', + registryDependencies: ['dialog', 'collapsible', 'button'], + files: ['example/dialog-disclosure-demo.tsx'], + }, { name: 'dialog-close-button', type: 'components:example', diff --git a/apps/docs/content/guides/database/extensions/postgis.mdx b/apps/docs/content/guides/database/extensions/postgis.mdx index 68d781622ec..d05232ca547 100644 --- a/apps/docs/content/guides/database/extensions/postgis.mdx +++ b/apps/docs/content/guides/database/extensions/postgis.mdx @@ -29,7 +29,7 @@ You can get started with PostGIS by enabling the PostGIS extension in your Supab 1. Go to the [Database](/dashboard/project/_/database/tables) page in the Dashboard. 2. Click on **Extensions** in the sidebar. 3. Search for `postgis` and enable the extension. -4. In the confirmation prompt select "Create a new schema" and name it `gis` for example. +4. In the confirmation dialog, review the default `extensions` schema and click **Enable**. diff --git a/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx b/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx index 9bc089786e8..d8456a139a8 100644 --- a/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx +++ b/apps/studio/components/interfaces/Database/Extensions/EnableExtensionModal.tsx @@ -1,12 +1,10 @@ +import { ident, safeSql } from '@supabase/pg-meta' import { toast } from 'sonner' import { Button, Card, CardContent, cn, - Collapsible, - CollapsibleContent, - CollapsibleTrigger, Dialog, DialogContent, DialogFooter, @@ -17,9 +15,13 @@ import { } from 'ui' import { Admonition } from 'ui-patterns/Admonition' import { CodeBlock } from 'ui-patterns/CodeBlock' +import { + DialogDisclosure, + DialogDisclosureContent, + DialogDisclosureTrigger, +} from 'ui-patterns/DialogDisclosure' import { DocsButton } from '@/components/ui/DocsButton' -import { InlineLinkClassName } from '@/components/ui/InlineLink' import { useDatabaseExtensionEnableMutation } from '@/data/database-extensions/database-extension-enable-mutation' import { type DatabaseExtension } from '@/data/database-extensions/database-extensions-query' import { useIsOrioleDb, useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject' @@ -45,6 +47,7 @@ export const EnableExtensionModal = ({ // [Joshen] Hard-coding pg_cron here as this is enforced on our end (Not via pg_available_extension_versions) const defaultSchema = extension.name === 'pg_cron' ? 'pg_catalog' : extension.default_version_schema + const hasFixedSchema = defaultSchema != null const { mutate: enableExtension, isPending: isEnabling } = useDatabaseExtensionEnableMutation({ onSuccess: () => { @@ -76,9 +79,9 @@ export const EnableExtensionModal = ({ if (!open) onCancel() }} > - + - Confirm to enable {extension.name} + Enable {extension.name} @@ -99,58 +102,67 @@ export const EnableExtensionModal = ({

- The following database extension will be enabled + {hasFixedSchema + ? 'This extension must be installed in the schema below.' + : 'This extension will be installed in the schema below.'}

-
+

Extension

-

{extension.name}

+ {extension.name}
-
+

Schema

-

+ {defaultSchema ?? 'extensions'} -

+
- - - - Need to install this in a different schema? - - -
-

- Installing in the extensions schema is highly recommended since some extensions - are hard to move after installation. -

-

To use a different schema, run this in the SQL Editor:

-
- -
-
+ {!hasFixedSchema && ( + <> + + + + Install in a different schema + + + +
+

+ We recommend using the extensions{' '} + schema to keep extension objects separate from your own tables. +

+

+ To use another schema, run the following in the SQL Editor. Replace{' '} + target_schema with an existing + schema name. +

+
+ +
+
+
+ + )} + diff --git a/apps/studio/components/interfaces/Settings/API/HardenAPIModal.tsx b/apps/studio/components/interfaces/Settings/API/HardenAPIModal.tsx index e958a7e69b0..128ea3d804a 100644 --- a/apps/studio/components/interfaces/Settings/API/HardenAPIModal.tsx +++ b/apps/studio/components/interfaces/Settings/API/HardenAPIModal.tsx @@ -1,12 +1,9 @@ -import { Check, ChevronDown } from 'lucide-react' +import { Check } from 'lucide-react' import { toast } from 'sonner' import { Alert, AlertDescription, AlertTitle, - Collapsible, - CollapsibleContent, - CollapsibleTrigger, Dialog, DialogContent, DialogDescription, @@ -17,6 +14,11 @@ import { WarningIcon, } from 'ui' import { CodeBlock } from 'ui-patterns/CodeBlock' +import { + DialogDisclosure, + DialogDisclosureContent, + DialogDisclosureTrigger, +} from 'ui-patterns/DialogDisclosure' import { ButtonTooltip } from '@/components/ui/ButtonTooltip' import { DocsButton } from '@/components/ui/DocsButton' @@ -129,21 +131,18 @@ export const HardenAPIModal = ({ visible, onClose }: HardenAPIModalProps) => { - - -

- 1. Create a custom api schema and expose it -

- {hasAPISchema && isAPISchemaExposed ? ( - - ) : ( - - )} -
- + + + ) : undefined + } + > + 1. Create a custom api schema and expose it + +

Click the button below to create a new schema named{' '} api and grant the{' '} @@ -207,27 +206,20 @@ export const HardenAPIModal = ({ visible, onClose }: HardenAPIModalProps) => { {`grant select on table api. to anon;\ngrant select, insert, update, delete on table api. to authenticated;`}

- - + + - - -

- 2. Remove the public schema from the exposed - schemas -

- {!isPublicSchemaExposed ? ( - - ) : ( - - )} -
- + + : undefined} + > + 2. Remove the public schema from the exposed + schemas + +
@@ -262,8 +254,8 @@ export const HardenAPIModal = ({ visible, onClose }: HardenAPIModalProps) => { Remove public schema from exposed schemas
-
-
+ + ) diff --git a/apps/studio/components/interfaces/SignIn/SessionTimeoutModal.tsx b/apps/studio/components/interfaces/SignIn/SessionTimeoutModal.tsx index 89cf1b1b073..805af55ce7f 100644 --- a/apps/studio/components/interfaces/SignIn/SessionTimeoutModal.tsx +++ b/apps/studio/components/interfaces/SignIn/SessionTimeoutModal.tsx @@ -12,8 +12,14 @@ import { AlertDialogHeader, AlertDialogTitle, Button, + DialogSection, + DialogSectionSeparator, } from 'ui' -import { CollapsibleAlert } from 'ui-patterns/collapsible-alert' +import { + DialogDisclosure, + DialogDisclosureContent, + DialogDisclosureTrigger, +} from 'ui-patterns/DialogDisclosure' import { SupportLink } from '../Support/SupportLink' import { InlineLink, InlineLinkClassName } from '@/components/ui/InlineLink' @@ -54,45 +60,47 @@ export const SessionTimeoutModal = ({ Session expired - -
-

Please sign in again to continue.

- -
-

- Try a different browser or disable extensions that block network requests. If - the problem persists: -

- -

- Still stuck?{' '} - - Contact support - {' '} - and include a{' '} - - HAR file - {' '} - from your session to help us investigate. -

-
-
-
-
+ Please sign in again to continue.
+ + + Having trouble? + + +
+

+ Try a different browser or disable extensions that block network requests. If the + problem persists: +

+ +

+ Still stuck?{' '} + + Contact support + {' '} + and include a{' '} + + HAR file + {' '} + from your session to help us investigate. +

+
+
+
+
Close Sign in again diff --git a/e2e/studio/features/database.spec.ts b/e2e/studio/features/database.spec.ts index 8a056f397c2..32913206ffa 100644 --- a/e2e/studio/features/database.spec.ts +++ b/e2e/studio/features/database.spec.ts @@ -900,7 +900,7 @@ test.describe('Database Extensions', () => { const dialog = page.getByRole('dialog') await expect(dialog, 'Enable extension dialog should be visible').toBeVisible() await expect( - dialog.getByText(`Confirm to enable ${EXTENSION_NAME}`), + dialog.getByRole('heading', { name: `Enable ${EXTENSION_NAME}`, exact: true }), 'Dialog title should match extension name' ).toBeVisible() await expect( @@ -915,7 +915,7 @@ test.describe('Database Extensions', () => { ref, 'query?key=database-extensions' ) - await dialog.getByRole('button', { name: 'Enable extension' }).click() + await dialog.getByRole('button', { name: 'Enable', exact: true }).click() await enableWait await refetchWait diff --git a/packages/config/typography.css b/packages/config/typography.css index bf85aef7b7a..7c67d8a4eb2 100644 --- a/packages/config/typography.css +++ b/packages/config/typography.css @@ -47,7 +47,7 @@ /* Pair with `code` elements for semantic consistency, e.g. */ @utility text-code-inline { - @apply break-all text-xs tracking-tight bg-surface-200 border border-muted rounded-md px-1 py-0.5 text-foreground font-medium; + @apply break-all text-xs tracking-tight bg-surface-200 border border-muted rounded-sm px-1 py-0.25 text-foreground font-medium; } @layer base { diff --git a/packages/ui-patterns/package.json b/packages/ui-patterns/package.json index 0ac7fca083a..47ad8e52f2b 100644 --- a/packages/ui-patterns/package.json +++ b/packages/ui-patterns/package.json @@ -298,6 +298,10 @@ "import": "./src/DatePicker/index.ts", "types": "./src/DatePicker/index.ts" }, + "./DialogDisclosure": { + "import": "./src/DialogDisclosure.tsx", + "types": "./src/DialogDisclosure.tsx" + }, "./Dialogs/ConfirmationModal": { "import": "./src/Dialogs/ConfirmationModal.tsx", "types": "./src/Dialogs/ConfirmationModal.tsx" @@ -702,10 +706,6 @@ "import": "./src/TweetCard/index.tsx", "types": "./src/TweetCard/index.tsx" }, - "./collapsible-alert": { - "import": "./src/collapsible-alert.tsx", - "types": "./src/collapsible-alert.tsx" - }, "./consent": { "import": "./src/consent.tsx", "types": "./src/consent.tsx" diff --git a/packages/ui-patterns/src/DialogDisclosure.tsx b/packages/ui-patterns/src/DialogDisclosure.tsx new file mode 100644 index 00000000000..fb69dd93c33 --- /dev/null +++ b/packages/ui-patterns/src/DialogDisclosure.tsx @@ -0,0 +1,47 @@ +import { ChevronDown } from 'lucide-react' +import type { ComponentProps, ReactNode } from 'react' +import { cn, Collapsible, CollapsibleContent, CollapsibleTrigger } from 'ui' + +type DialogDisclosureTriggerProps = ComponentProps & { + icon?: ReactNode +} + +export const DialogDisclosure: typeof Collapsible = Collapsible + +export const DialogDisclosureTrigger = ({ + children, + className, + icon, + ...props +}: DialogDisclosureTriggerProps) => ( + + {children} + + +) + +export const DialogDisclosureContent = ({ + className, + ...props +}: ComponentProps) => ( + +) diff --git a/packages/ui-patterns/src/collapsible-alert.tsx b/packages/ui-patterns/src/collapsible-alert.tsx deleted file mode 100644 index b83b8bc27d0..00000000000 --- a/packages/ui-patterns/src/collapsible-alert.tsx +++ /dev/null @@ -1,46 +0,0 @@ -'use client' - -import { type VariantProps } from 'class-variance-authority' -import { ChevronDown } from 'lucide-react' -import * as React from 'react' -import { alertVariants, Button, cn, Collapsible, CollapsibleContent, CollapsibleTrigger } from 'ui' - -export interface CollapsibleAlertProps - extends Omit, 'title'>, VariantProps { - trigger: React.ReactNode - defaultOpen?: boolean -} - -const CollapsibleAlert = React.forwardRef( - ({ className, variant = 'default', trigger, defaultOpen, children, ...props }, ref) => ( -
- -
- {trigger} - -
- {children} -
-
- ) -) -CollapsibleAlert.displayName = 'CollapsibleAlert' - -export { CollapsibleAlert } diff --git a/packages/ui/src/components/shadcn/ui/alert-dialog.tsx b/packages/ui/src/components/shadcn/ui/alert-dialog.tsx index e02c894c259..b18691c9e7a 100644 --- a/packages/ui/src/components/shadcn/ui/alert-dialog.tsx +++ b/packages/ui/src/components/shadcn/ui/alert-dialog.tsx @@ -215,7 +215,7 @@ const AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes[role=alert])+&]:border-t-0', + 'flex flex-col-reverse gap-y-2 sm:flex-row sm:justify-end sm:space-x-2 border-t py-3 px-5 [[data-slot=alert-dialog-body]:has(>[role=alert])+&]:border-t-0', className )} {...props} @@ -373,11 +373,7 @@ const AlertDialogCancel = React.forwardRef< return ( diff --git a/packages/ui/src/components/shadcn/ui/dialog.tsx b/packages/ui/src/components/shadcn/ui/dialog.tsx index 226ef4b0003..f5aab7d251d 100644 --- a/packages/ui/src/components/shadcn/ui/dialog.tsx +++ b/packages/ui/src/components/shadcn/ui/dialog.tsx @@ -153,7 +153,7 @@ const DialogFooter = React.forwardRef<
, React.ComponentPropsWithoutRef ->(({ className, children, ...props }, ref) => ( +>(({ className, children, asChild, ...props }, ref) => (