Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

style: improve modal styles

Brad Barbin1392d0db0dfe
diff --git a/packages/react/src/Modal.tsx b/packages/react/src/Modal.tsx
index 0810593426..b4afa05716 100644
--- a/packages/react/src/Modal.tsx
+++ b/packages/react/src/Modal.tsx
@@ -43,13 +43,13 @@ ModalOverlay.displayName = DialogPrimitive.Overlay.displayName;
const ModalContentVariants = cva(
cn(
- "p-6",
+ "px-0 pt-6",
"relative z-50 grid w-full border dark:border-none gap-4 shadow-md dark:shadow-sm duration-200",
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
"data-[state=closed]:slide-out-to-left-[0%] data-[state=closed]:slide-out-to-top-[0%",
"data-[state=open]:slide-in-from-left-[0%] data-[state=open]:slide-in-from-top-[0%]",
- "sm:rounded-lg md:w-full",
+ "sm:rounded-xl md:w-full",
"bg-background focus-visible:outline-none focus-visible:ring-0",
"dark:shadow-[inset_0_0.5px_0_rgb(255_255_255_/_0.08),_inset_0_0_1px_rgb(255_255_255_/_0.24),_0_0_0_0.5px_rgb(0,0,0,1),0px_0px_4px_rgba(0,_0,_0,_0.08)]"
),
@@ -108,7 +108,7 @@ const ModalHeader = ({
}: HTMLAttributes<HTMLDivElement>) => (
<div
className={cn(
- "flex flex-col space-y-1.5 text-center sm:text-left p-1 pt-0 mb-4",
+ "flex flex-col space-y-1.5 text-center sm:text-left mb-6 px-6",
className
)}
{...props}
@@ -117,7 +117,7 @@ const ModalHeader = ({
ModalHeader.displayName = "ModalHeader";
const ModalBody = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (
- <div className={cn(" w-full p-1 pt-0", className)} {...props} />
+ <div className={cn(" w-full py-0 px-6 mb-6", className)} {...props} />
);
ModalBody.displayName = "ModalBody";
@@ -127,7 +127,7 @@ const ModalFooter = ({
}: HTMLAttributes<HTMLDivElement>) => (
<div
className={cn(
- "flex flex-col-reverse sm:flex-row sm:justify-end gap-2 pt-6",
+ "flex flex-col-reverse sm:flex-row sm:justify-end gap-2 px-6 py-3 border-t border-border bg-muted/40 sm:rounded-b-xl",
className
)}
{...props}
@@ -142,7 +142,7 @@ const ModalTitle = forwardRef<
<DialogPrimitive.Title
ref={ref}
className={cn(
- "text-xl font-semibold font-headline leading-none tracking-tight text-foreground",
+ "text-base font-medium font-headline leading-none tracking-tight text-foreground",
className
)}
{...props}
@@ -156,7 +156,7 @@ const ModalDescription = forwardRef<
>(({ className, ...props }, ref) => (
<DialogPrimitive.Description
ref={ref}
- className={cn("text-sm text-muted-foreground", className)}
+ className={cn("text-xs text-muted-foreground", className)}
{...props}
/>
));