0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 21:53:27 -05:00
penpot-exporter-figma-plugin/ui-src/components/PluginReload.tsx

27 lines
736 B
TypeScript
Raw Normal View History

import { Banner, Button, IconInfo32 } from '@create-figma-plugin/ui';
import { Stack } from '@ui/components/Stack';
import { useFigmaContext } from '@ui/context';
export const PluginReload = () => {
const { reload, cancel } = useFigmaContext();
return (
<Stack space="small">
<Banner icon={<IconInfo32 />}>
Changes detected in fonts.
<br />
Please reload the plug-in to ensure all modifications are included in the exported file.
</Banner>
<Stack space="xsmall" direction="row">
<Button onClick={reload} fullWidth>
Reload
</Button>
<Button secondary onClick={cancel} fullWidth>
Cancel
</Button>
</Stack>
</Stack>
);
};