Fix ViewIcons & plugins that use image modals
Co-Authored-By: sadan <117494111+sadan4@users.noreply.github.com>
This commit is contained in:
parent
58c3032bb2
commit
a11ccde40f
9 changed files with 114 additions and 54 deletions
|
|
@ -101,25 +101,24 @@ export const Modals = findByPropsLazy("ModalRoot", "ModalCloseButton") as {
|
|||
}>;
|
||||
};
|
||||
|
||||
export type ImageModal = ComponentType<{
|
||||
className?: string;
|
||||
src: string;
|
||||
placeholder: string;
|
||||
original: string;
|
||||
export interface ImageModalItem {
|
||||
type: "IMAGE" | "VIDEO";
|
||||
url: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
animated?: boolean;
|
||||
responsive?: boolean;
|
||||
renderLinkComponent(props: any): ReactNode;
|
||||
renderForwardComponent(props: any): ReactNode;
|
||||
maxWidth?: number;
|
||||
maxHeight?: number;
|
||||
shouldAnimate?: boolean;
|
||||
original?: string;
|
||||
}
|
||||
|
||||
export type ImageModal = ComponentType<{
|
||||
className?: string;
|
||||
fit?: string;
|
||||
onClose?(): void;
|
||||
shouldHideMediaOptions?: boolean;
|
||||
shouldAnimate?: boolean;
|
||||
items: ImageModalItem[];
|
||||
}>;
|
||||
|
||||
export const ImageModal = findComponentByCodeLazy(".MEDIA_MODAL_CLOSE", "responsive") as ImageModal;
|
||||
export const ImageModal = findComponentByCodeLazy(".MEDIA_MODAL_CLOSE") as ImageModal;
|
||||
|
||||
export const ModalRoot = LazyComponent(() => Modals.ModalRoot);
|
||||
export const ModalHeader = LazyComponent(() => Modals.ModalHeader);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue