mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-03 05:10:13 -05:00
b44cbf2052
* remove custom fonts form * changeset * changeset
32 lines
965 B
TypeScript
32 lines
965 B
TypeScript
import { Banner, IconInfo32, Link } from '@create-figma-plugin/ui';
|
|
|
|
import { useFigmaContext } from '@ui/context';
|
|
|
|
import { Stack } from './Stack';
|
|
|
|
export const MissingFontsSection = () => {
|
|
const { missingFonts } = useFigmaContext();
|
|
|
|
if (!missingFonts || !missingFonts.length) return null;
|
|
|
|
return (
|
|
<Stack space="small">
|
|
<Stack space="xsmall">
|
|
<Banner icon={<IconInfo32 />}>
|
|
{missingFonts.length} custom font{missingFonts.length > 1 ? 's' : ''} detected:
|
|
<ul style={{ paddingLeft: 20 }}>
|
|
{missingFonts.map(font => (
|
|
<li key={font}>{font}</li>
|
|
))}
|
|
</ul>
|
|
</Banner>
|
|
<span>
|
|
To export your file with custom fonts, first upload them in Penpot.{' '}
|
|
<Link href="https://help.penpot.app/user-guide/custom-fonts/" target="_blank">
|
|
Learn how to upload fonts.
|
|
</Link>
|
|
</span>
|
|
</Stack>
|
|
</Stack>
|
|
);
|
|
};
|