@nex-ui/react
Version:
🎉 A beautiful, modern, and reliable React component library.
43 lines (40 loc) • 1.28 kB
JavaScript
"use client";
import { jsx } from 'react/jsx-runtime';
import { useDefaultProps } from '../utils/useDefaultProps.mjs';
import { useSlotClasses } from '../utils/useSlotClasses.mjs';
import { useStyles } from '../utils/useStyles.mjs';
import { useSlot } from '../utils/useSlot.mjs';
import { ModalFooter } from '../modal/ModalFooter.mjs';
import { dialogFooterRecipe } from '../../theme/recipes/dialog.mjs';
const slots = [
'root'
];
const DialogFooter = (inProps)=>{
const props = useDefaultProps({
name: 'DialogFooter',
props: inProps
});
const { children, ...remainingProps } = props;
const slotClasses = useSlotClasses({
name: 'DialogFooter',
slots
});
const style = useStyles({
ownerState: props,
name: 'DialogFooter',
recipe: dialogFooterRecipe
});
const [DialogFooterRoot, getDialogFooterRootProps] = useSlot({
style,
elementType: ModalFooter,
classNames: slotClasses.root,
externalForwardedProps: remainingProps,
shouldForwardComponent: false
});
return /*#__PURE__*/ jsx(DialogFooterRoot, {
...getDialogFooterRootProps(),
children: children
});
};
DialogFooter.displayName = 'DialogFooter';
export { DialogFooter };