Local modifications to ClusterLabs/Anvil by Alteeve
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
926 B

import {
ForwardRefExoticComponent,
PropsWithChildren,
RefAttributes,
forwardRef,
} from 'react';
import Dialog from './Dialog';
import DialogHeader from './DialogHeader';
const DialogWithHeader: ForwardRefExoticComponent<
PropsWithChildren<DialogWithHeaderProps> &
RefAttributes<DialogForwardedRefContent>
> = forwardRef<DialogForwardedRefContent, DialogWithHeaderProps>(
(props, ref) => {
const {
children,
dialogProps,
header,
loading,
openInitially,
showClose,
wide,
} = props;
return (
<Dialog
dialogProps={dialogProps}
loading={loading}
openInitially={openInitially}
ref={ref}
wide={wide}
>
<DialogHeader showClose={showClose}>{header}</DialogHeader>
{children}
</Dialog>
);
},
);
DialogWithHeader.displayName = 'DialogWithHeader';
export default DialogWithHeader;