0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 05:33:02 -05:00

Fix interface when exporting (#127)

This commit is contained in:
Jordi Sala Morales 2024-05-31 13:28:44 +02:00 committed by GitHub
parent 88b3e5f69c
commit 79f6ce80d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,9 +70,9 @@ export const PenpotExporter = () => {
};
}, []);
if (loading) {
return <LoadingIndicator />;
}
if (loading) return <LoadingIndicator />;
if (exporting) return <ExporterProgress />;
if (needsReload) {
return (
@ -98,18 +98,14 @@ export const PenpotExporter = () => {
<form onSubmit={methods.handleSubmit(exportPenpot)}>
<Stack>
<MissingFontsSection fonts={missingFonts} />
{exporting ? (
<ExporterProgress />
) : (
<Stack space="xsmall" direction="row">
<Button type="submit" fullWidth>
Export to Penpot
</Button>
<Button secondary onClick={cancel} fullWidth>
Cancel
</Button>
</Stack>
)}
<Stack space="xsmall" direction="row">
<Button type="submit" fullWidth>
Export to Penpot
</Button>
<Button secondary onClick={cancel} fullWidth>
Cancel
</Button>
</Stack>
</Stack>
</form>
</FormProvider>