Update dialog logic to support defining buttons/icon from anywhere

This commit is contained in:
DaneEveritt 2022-07-02 17:24:12 -04:00
parent 48af9bced1
commit 7c4028f8f1
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
9 changed files with 182 additions and 121 deletions

View file

@ -0,0 +1,13 @@
import React from 'react';
interface DialogContextType {
icon: React.RefObject<HTMLDivElement | undefined>;
buttons: React.RefObject<HTMLDivElement | undefined>;
}
const DialogContext = React.createContext<DialogContextType>({
icon: React.createRef(),
buttons: React.createRef(),
});
export default DialogContext;