Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+29
-1
@@ -1,5 +1,10 @@
|
||||
// @subframe/sync-disable
|
||||
"use client";
|
||||
import React from "react";
|
||||
import { Dialog as DialogComponent } from "./Dialog";
|
||||
import { MODAL_LAYER_CLASS } from "../../layers";
|
||||
import { MODAL_CONTENT_MOTION_CLASS, MODAL_OVERLAY_MOTION_CLASS } from "../../modal-motion";
|
||||
import * as SubframeUtils from "../../utils";
|
||||
|
||||
/**
|
||||
* Add wrapper components and business logic here.
|
||||
@@ -7,4 +12,27 @@ import { Dialog as DialogComponent } from "./Dialog";
|
||||
* Learn more: https://docs.subframe.com/concepts/syncing-components#wrapping-components
|
||||
*/
|
||||
|
||||
export const Dialog = DialogComponent;
|
||||
const DialogRoot = React.forwardRef<
|
||||
React.ElementRef<typeof DialogComponent>,
|
||||
React.ComponentProps<typeof DialogComponent>
|
||||
>(function DialogRoot({ className, ...otherProps }, ref) {
|
||||
return (
|
||||
<DialogComponent
|
||||
className={SubframeUtils.twClassNames(MODAL_LAYER_CLASS, MODAL_OVERLAY_MOTION_CLASS, className)}
|
||||
data-ui-layer="modal"
|
||||
ref={ref}
|
||||
{...otherProps}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
const DialogContent = React.forwardRef<
|
||||
React.ElementRef<typeof DialogComponent.Content>,
|
||||
React.ComponentProps<typeof DialogComponent.Content>
|
||||
>(function DialogContent({ className, ...otherProps }, ref) {
|
||||
return <DialogComponent.Content className={SubframeUtils.twClassNames(MODAL_CONTENT_MOTION_CLASS, className)} ref={ref} {...otherProps} />;
|
||||
});
|
||||
|
||||
export const Dialog = Object.assign(DialogRoot, {
|
||||
Content: DialogContent,
|
||||
});
|
||||
Reference in new issue
Block a user