diff --git a/.changeset/poor-scissors-chew.md b/.changeset/poor-scissors-chew.md index eda562ba27..c8fd1216d9 100644 --- a/.changeset/poor-scissors-chew.md +++ b/.changeset/poor-scissors-chew.md @@ -2,4 +2,4 @@ "@salt-ds/lab": patch --- -fix alignment for titles spanning into multiple lines, wrap labs dialog header in H2 to avoid breaking change +Overlay and Dialog headers fix alignment for titles spanning into multiple lines, wrap preheader and headers in H2. diff --git a/packages/lab/src/dialog/DialogHeader.tsx b/packages/lab/src/dialog/DialogHeader.tsx index 22395b4782..6b2eb226b7 100644 --- a/packages/lab/src/dialog/DialogHeader.tsx +++ b/packages/lab/src/dialog/DialogHeader.tsx @@ -83,12 +83,10 @@ export const DialogHeader = forwardRef( > {status && }
-
- {preheader && ( - {preheader} - )} -

{header}

-
+

+ {preheader && {preheader}} + {header} +

{description && ( {description} diff --git a/packages/lab/src/overlay/OverlayHeader.tsx b/packages/lab/src/overlay/OverlayHeader.tsx index 0375929a12..76bb694390 100644 --- a/packages/lab/src/overlay/OverlayHeader.tsx +++ b/packages/lab/src/overlay/OverlayHeader.tsx @@ -1,4 +1,4 @@ -import { Text, makePrefixer } from "@salt-ds/core"; +import { H2, Text, makePrefixer } from "@salt-ds/core"; import { useComponentCssInjection } from "@salt-ds/styles"; import { useWindow } from "@salt-ds/window"; import { clsx } from "clsx"; @@ -45,12 +45,10 @@ export const OverlayHeader = forwardRef( return (
-
- {preheader && ( - {preheader} - )} +

+ {preheader && {preheader}} {header} -

+ {description && ( {description}