gantri-components 2.248.1 → 2.249.0
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.
|
@@ -43,6 +43,7 @@ export declare const StyledDynamicGlow: import("styled-components/dist/types").I
|
|
|
43
43
|
export declare const StyledDynamicCloseButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
44
44
|
export declare const StyledModalFooter: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {
|
|
45
45
|
$floating?: boolean | undefined;
|
|
46
|
+
$fullWidth?: boolean | undefined;
|
|
46
47
|
$hasBorder: boolean;
|
|
47
48
|
}>> & string;
|
|
48
49
|
export declare const StyledModalBackdrop: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
@@ -3,6 +3,22 @@ import { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
|
3
3
|
import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
|
|
4
4
|
import { StackProps } from '../stack/stack.types';
|
|
5
5
|
export type ModalSurface = 'solid' | 'dynamic';
|
|
6
|
+
/**
|
|
7
|
+
* How the modal footer lays out its action(s).
|
|
8
|
+
*
|
|
9
|
+
* - `'auto'` (default):
|
|
10
|
+
* * Solid surface — the existing grid layout (`auto-fit, 1fr`), each
|
|
11
|
+
* child button gets equal width.
|
|
12
|
+
* * Dynamic surface — footer floats centered at the bottom; children
|
|
13
|
+
* take their natural width and sit side-by-side, centered.
|
|
14
|
+
* - `'fullWidth'`:
|
|
15
|
+
* * Solid surface — unchanged (already full-width via grid auto-fit).
|
|
16
|
+
* * Dynamic surface — footer floats across the full content width,
|
|
17
|
+
* respecting the modal's horizontal padding. A single primary
|
|
18
|
+
* button stretches edge-to-edge; multiple children share the row
|
|
19
|
+
* with `flex: 1` each.
|
|
20
|
+
*/
|
|
21
|
+
export type ModalFooterLayout = 'auto' | 'fullWidth';
|
|
6
22
|
export interface ModalProps {
|
|
7
23
|
bodyStyle?: CSSProperties;
|
|
8
24
|
closeable?: boolean;
|
|
@@ -14,6 +30,12 @@ export interface ModalProps {
|
|
|
14
30
|
/** Applies to desktop only. */
|
|
15
31
|
detailsPanelWidth?: Property.Width;
|
|
16
32
|
footer?: ReactElement;
|
|
33
|
+
/**
|
|
34
|
+
* Controls how the footer lays out its action(s). Defaults to
|
|
35
|
+
* `'auto'` (centered for dynamic, grid for solid). Use `'fullWidth'`
|
|
36
|
+
* to stretch a single primary action across the modal width.
|
|
37
|
+
*/
|
|
38
|
+
footerLayout?: ModalFooterLayout;
|
|
17
39
|
header?: ReactNode;
|
|
18
40
|
headerBorderBottom?: Property.Border;
|
|
19
41
|
headerStyle?: CSSProperties;
|