From 552a100d64584bdb4a0b4676183c5e37539bf759 Mon Sep 17 00:00:00 2001 From: Rohan Chakraborty Date: Tue, 19 May 2026 11:02:10 +0530 Subject: [PATCH 1/2] fix: dialog styles --- .../docs/components/alert-dialog/demo.ts | 16 +++++++------- .../docs/components/alert-dialog/index.mdx | 5 ++--- .../alert-dialog/alert-dialog-misc.tsx | 8 +++---- .../alert-dialog/alert-dialog.module.css | 17 ++++++++++++++ .../components/dialog/dialog-misc.tsx | 8 +++---- .../components/dialog/dialog.module.css | 22 ++++--------------- 6 files changed, 38 insertions(+), 38 deletions(-) diff --git a/apps/www/src/content/docs/components/alert-dialog/demo.ts b/apps/www/src/content/docs/components/alert-dialog/demo.ts index 9fa192183..c2a386eb3 100644 --- a/apps/www/src/content/docs/components/alert-dialog/demo.ts +++ b/apps/www/src/content/docs/components/alert-dialog/demo.ts @@ -7,13 +7,13 @@ export const getCode = (props: { title?: string; description?: string }) => { }> Discard draft - - + + ${title} ${description} - + Cancel} /> Discard} /> @@ -45,7 +45,7 @@ export const controlledDemo = { }> Delete Account - + Delete Account @@ -88,7 +88,7 @@ export const menuDemo = { - + Delete item? @@ -113,7 +113,7 @@ export const discardDemo = { }> Discard Changes - + Unsaved Changes @@ -139,7 +139,7 @@ export const nestedDemo = { }> Delete Workspace - + Delete Workspace @@ -151,7 +151,7 @@ export const nestedDemo = { }> Confirm Delete - + Final Confirmation diff --git a/apps/www/src/content/docs/components/alert-dialog/index.mdx b/apps/www/src/content/docs/components/alert-dialog/index.mdx index 0230cdad6..0722db7f8 100644 --- a/apps/www/src/content/docs/components/alert-dialog/index.mdx +++ b/apps/www/src/content/docs/components/alert-dialog/index.mdx @@ -21,10 +21,9 @@ import { AlertDialog } from '@raystack/apsara' - - - + + diff --git a/packages/raystack/components/alert-dialog/alert-dialog-misc.tsx b/packages/raystack/components/alert-dialog/alert-dialog-misc.tsx index 00551e110..489cd2d81 100644 --- a/packages/raystack/components/alert-dialog/alert-dialog-misc.tsx +++ b/packages/raystack/components/alert-dialog/alert-dialog-misc.tsx @@ -13,9 +13,9 @@ export const AlertDialogHeader = ({ ...props }: ComponentProps) => ( ); @@ -43,7 +43,7 @@ export const AlertDialogBody = ({ ); diff --git a/packages/raystack/components/alert-dialog/alert-dialog.module.css b/packages/raystack/components/alert-dialog/alert-dialog.module.css index 0501f2f89..d66224258 100644 --- a/packages/raystack/components/alert-dialog/alert-dialog.module.css +++ b/packages/raystack/components/alert-dialog/alert-dialog.module.css @@ -1,3 +1,20 @@ +.header { + padding: var(--rs-space-7); + border-bottom: 0; +} + +.header:has(+ .body) { + padding-bottom: var(--rs-space-5); +} + +.body { + padding: 0 var(--rs-space-7) var(--rs-space-5); +} + +.body:first-child { + padding: var(--rs-space-7); +} + .footer { border-top: 0; } diff --git a/packages/raystack/components/dialog/dialog-misc.tsx b/packages/raystack/components/dialog/dialog-misc.tsx index 218948816..bbff676b7 100644 --- a/packages/raystack/components/dialog/dialog-misc.tsx +++ b/packages/raystack/components/dialog/dialog-misc.tsx @@ -5,6 +5,7 @@ import { Cross1Icon } from '@radix-ui/react-icons'; import { cx } from 'class-variance-authority'; import { type ComponentProps } from 'react'; import { Flex } from '../flex'; +import { IconButton } from '../icon-button'; import styles from './dialog.module.css'; export function DialogHeader({ @@ -55,14 +56,11 @@ export function DialogBody({ DialogBody.displayName = 'Dialog.Body'; -export function CloseButton({ - className, - ...props -}: DialogPrimitive.Close.Props) { +export function CloseButton(props: DialogPrimitive.Close.Props) { return ( } {...props} >