2024-05-12 15:45:26 -04:00
|
|
|
import { FC, ReactNode } from 'react';
|
|
|
|
|
|
|
|
|
|
import { Export, findModuleDetailsByExport } from '../webpack';
|
|
|
|
|
|
|
|
|
|
// TODO where did this go?
|
|
|
|
|
// export const Panel: FC<{ children?: ReactNode; }> = findModuleExport((e: Export) => {
|
|
|
|
|
// if (typeof mod !== 'object' || !mod.__esModule) return undefined;
|
|
|
|
|
// return mod.Panel;
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
export interface PanelSectionProps {
|
|
|
|
|
title?: string;
|
|
|
|
|
spinner?: boolean;
|
|
|
|
|
children?: ReactNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const [mod, panelSection] = findModuleDetailsByExport((e: Export) => e.toString()?.includes('.PanelSection'));
|
|
|
|
|
|
|
|
|
|
export const PanelSection = panelSection as FC<PanelSectionProps>;
|
|
|
|
|
|
|
|
|
|
export interface PanelSectionRowProps {
|
|
|
|
|
children?: ReactNode;
|
|
|
|
|
}
|
2024-05-12 15:48:13 -04:00
|
|
|
export const PanelSectionRow = Object.values(mod).filter(
|
2024-10-11 14:47:27 -04:00
|
|
|
(exp: any) => !exp?.toString?.()?.includes('.PanelSection'),
|
2024-05-12 15:48:13 -04:00
|
|
|
)[0] as FC<PanelSectionRowProps>;
|