39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
"use client";
|
|
/*
|
|
* Documentation:
|
|
* Dialog Layout — https://app.subframe.com/f023064a5ca0/library?component=Dialog+Layout_ff4920a8-df26-4012-934d-0a9edbf5e373
|
|
* Modal Blank — https://app.subframe.com/f023064a5ca0/library?component=Modal+Blank_ca59db17-43fb-4247-8094-3c55162e902d
|
|
*/
|
|
|
|
import React from "react";
|
|
import { ModalBlank } from "../../components/ModalBlank";
|
|
import * as SubframeUtils from "../../utils";
|
|
|
|
export interface DialogLayoutRootProps
|
|
extends React.ComponentProps<typeof ModalBlank> {
|
|
children?: React.ReactNode;
|
|
className?: string;
|
|
}
|
|
|
|
const DialogLayoutRoot = React.forwardRef<
|
|
React.ElementRef<typeof ModalBlank>,
|
|
DialogLayoutRootProps
|
|
>(function DialogLayoutRoot(
|
|
{ children, className, ...otherProps }: DialogLayoutRootProps,
|
|
ref
|
|
) {
|
|
return (
|
|
<ModalBlank className={className} ref={ref} {...otherProps}>
|
|
<ModalBlank.Content>
|
|
{children ? (
|
|
<div className="flex w-full grow shrink-0 basis-0 items-start gap-6">
|
|
{children}
|
|
</div>
|
|
) : null}
|
|
</ModalBlank.Content>
|
|
</ModalBlank>
|
|
);
|
|
});
|
|
|
|
export const DialogLayout = DialogLayoutRoot;
|