2022-11-25 20:25:03 +00:00
|
|
|
import { useContext } from 'react';
|
|
|
|
import * as React from 'react';
|
2022-07-03 17:29:23 +00:00
|
|
|
import { DialogContext } from './';
|
2022-07-02 22:27:22 +00:00
|
|
|
import { useDeepCompareEffect } from '@/plugins/useDeepCompareEffect';
|
2022-07-02 21:24:12 +00:00
|
|
|
|
|
|
|
export default ({ children }: { children: React.ReactNode }) => {
|
2022-07-02 22:27:22 +00:00
|
|
|
const { setFooter } = useContext(DialogContext);
|
2022-07-02 21:24:12 +00:00
|
|
|
|
2022-07-02 22:27:22 +00:00
|
|
|
useDeepCompareEffect(() => {
|
|
|
|
setFooter(
|
2023-01-12 19:31:47 +00:00
|
|
|
<div className={'flex items-center justify-end space-x-3 rounded-b bg-slate-700 px-6 py-3'}>
|
2022-12-16 02:06:14 +00:00
|
|
|
{children}
|
|
|
|
</div>,
|
2022-07-02 22:27:22 +00:00
|
|
|
);
|
|
|
|
}, [children]);
|
2022-07-02 21:24:12 +00:00
|
|
|
|
2022-07-02 22:27:22 +00:00
|
|
|
return null;
|
2022-07-02 21:24:12 +00:00
|
|
|
};
|