0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 05:33:02 -05:00
penpot-exporter-figma-plugin/ui-src/components/LibraryError.tsx
Alex Sánchez 570aeee7b0
Minor updates (#239)
* minor updates

* lint fixes

* changeset
2024-12-04 08:06:58 +01:00

39 lines
1.1 KiB
TypeScript

import { Banner, Button, IconWarning32, Link } from '@create-figma-plugin/ui';
import { useFigmaContext } from '@ui/context';
import { Stack } from './Stack';
export const LibraryError = () => {
const { reload, cancel, error } = useFigmaContext();
if (!error) return null;
return (
<Stack space="small">
<Stack space="xsmall">
<Banner icon={<IconWarning32 />} variant="warning">
Oops! It looks like there was an <b>error generating the export file</b>.
</Banner>
<span>
Please open an issue in our{' '}
<Link
href="https://github.com/penpot/penpot-exporter-figma-plugin/issues"
target="_blank"
>
Github repository
</Link>
, and we&apos;ll be happy to assist you!
</span>
<Stack space="xsmall" direction="row">
<Button onClick={reload} fullWidth>
Reload
</Button>
<Button secondary onClick={cancel} fullWidth>
Cancel
</Button>
</Stack>
</Stack>
</Stack>
);
};