tera-system-ui 0.1.14 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -220,6 +220,9 @@ type DialogPropsCommon = {
|
|
|
220
220
|
focusTriggerAfterClose?: boolean;
|
|
221
221
|
padding?: 'none' | undefined;
|
|
222
222
|
containerClass?: string;
|
|
223
|
+
headerClass?: string;
|
|
224
|
+
bodyClass?: string;
|
|
225
|
+
footerClass?: string;
|
|
223
226
|
};
|
|
224
227
|
export type DialogProps = DialogVariants & DialogPropsCommon & {
|
|
225
228
|
children?: any;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import {Button} from "../button";
|
|
5
5
|
import './dialog.scss'
|
|
6
6
|
import {sleep} from "../../internal/helpers/sleep";
|
|
7
|
+
import {cn} from "../../utils";
|
|
7
8
|
|
|
8
9
|
let {
|
|
9
10
|
children, open = $bindable(),
|
|
@@ -20,6 +21,9 @@
|
|
|
20
21
|
triggerRef,
|
|
21
22
|
focusTriggerAfterClose,
|
|
22
23
|
containerClass,
|
|
24
|
+
headerClass,
|
|
25
|
+
bodyClass,
|
|
26
|
+
footerClass,
|
|
23
27
|
...props
|
|
24
28
|
}: DialogProps = $props();
|
|
25
29
|
|
|
@@ -91,16 +95,16 @@
|
|
|
91
95
|
|
|
92
96
|
<div class={"dialog-box " + dialogContainer({className: containerClass})}>
|
|
93
97
|
{#if header}
|
|
94
|
-
<header class={headerStyle()}>
|
|
98
|
+
<header class={cn(headerStyle(), headerClass)}>
|
|
95
99
|
{@render header?.()}
|
|
96
100
|
</header>
|
|
97
101
|
{/if}
|
|
98
102
|
|
|
99
|
-
<main class={body()}>
|
|
103
|
+
<main class={cn(body(), bodyClass)}>
|
|
100
104
|
{@render children?.()}
|
|
101
105
|
</main>
|
|
102
106
|
{#if footer}
|
|
103
|
-
<footer class={footerStyle()}>
|
|
107
|
+
<footer class={cn(footerStyle(), footerClass)}>
|
|
104
108
|
{@render footer?.()}
|
|
105
109
|
</footer>
|
|
106
110
|
{/if}
|