0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-03 13:20:37 -05:00
penpot-exporter-figma-plugin/ui-src/components/PenpotExporter.tsx

20 lines
524 B
TypeScript
Raw Normal View History

import { LoadingIndicator } from '@create-figma-plugin/ui';
import { useFigmaContext } from '@ui/context';
import { ExportForm } from './ExportForm';
import { ExporterProgress } from './ExporterProgress';
import { PluginReload } from './PluginReload';
export const PenpotExporter = () => {
const { loading, needsReload, exporting } = useFigmaContext();
2024-05-31 06:28:44 -05:00
if (loading) return <LoadingIndicator />;
if (exporting) return <ExporterProgress />;
if (needsReload) return <PluginReload />;
return <ExportForm />;
};