forked from riccardoperra/codeimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDialogPanel.tsx
More file actions
33 lines (29 loc) · 1.02 KB
/
DialogPanel.tsx
File metadata and controls
33 lines (29 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import {assignInlineVars} from '@vanilla-extract/dynamic';
import {JSXElement, ParentProps} from 'solid-js';
import {PropsWithChildren} from 'solid-js/types/render/component';
import {dynamicFullHeight} from '../../theme/variables.css';
import {Box} from '../Box';
import * as styles from './Dialog.css';
import {DialogPanelVariants} from './Dialog.css';
export type DialogPanelProps = DialogPanelVariants;
export function DialogPanel(props: ParentProps<DialogPanelProps>): JSXElement {
return (
<div
class={styles.panel({
size: props.size,
fullScreen: props.fullScreen,
})}
style={assignInlineVars({
[dynamicFullHeight]: `${window.innerHeight * 0.01}px`,
})}
>
{props.children}
</div>
);
}
export function DialogPanelContent(props: PropsWithChildren): JSXElement {
return <Box class={styles.panelContent}>{props.children}</Box>;
}
export function DialogPanelFooter(props: PropsWithChildren): JSXElement {
return <Box class={styles.panelFooter}>{props.children}</Box>;
}