@ozen-ui/kit
Version:
React component library
18 lines (17 loc) • 948 B
JavaScript
import { __assign, __rest } from "tslib";
import React, { forwardRef } from 'react';
import { cn } from '../../../../utils/classname';
import { BottomSheetBaseContent } from '../../../BottomSheetBase';
import { useDialogContext } from '../../DialogContext';
export var cnDialogBody = cn('DialogNextBody');
export var DialogBody = forwardRef(function (_a, ref) {
var children = _a.children, className = _a.className, other = __rest(_a, ["children", "className"]);
var _b = useDialogContext(), size = _b.size, deviceType = _b.deviceType, isBottomSheet = _b.isBottomSheet, viewType = _b.viewType;
var Component = (isBottomSheet ? BottomSheetBaseContent : 'div');
return (React.createElement(Component, __assign({}, other, { ref: ref, className: cnDialogBody({
size: size,
deviceType: deviceType,
viewType: viewType,
}, [className]) }), children));
});
DialogBody.displayName = 'DialogBody';