mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Minor redesign of Export Dialog (#604)
This commit is contained in:
parent
97b11b0f53
commit
ba4fc0f1b3
5 changed files with 45 additions and 42 deletions
|
@ -129,39 +129,41 @@ function ExportModal({
|
|||
<h2 id="export-title">{t("buttons.export")}</h2>
|
||||
<div className="ExportDialog__preview" ref={previewRef}></div>
|
||||
<div className="ExportDialog__actions">
|
||||
<Stack.Row gap={2}>
|
||||
<ToolButton
|
||||
type="button"
|
||||
icon={downloadFile}
|
||||
title={t("buttons.exportToPng")}
|
||||
aria-label={t("buttons.exportToPng")}
|
||||
onClick={() => onExportToPng(exportedElements, scale)}
|
||||
ref={pngButton}
|
||||
/>
|
||||
<ToolButton
|
||||
type="button"
|
||||
icon={svgFile}
|
||||
title={t("buttons.exportToSvg")}
|
||||
aria-label={t("buttons.exportToSvg")}
|
||||
onClick={() => onExportToSvg(exportedElements, scale)}
|
||||
/>
|
||||
{probablySupportsClipboard && (
|
||||
<Stack.Col gap={1}>
|
||||
<Stack.Row gap={2}>
|
||||
<ToolButton
|
||||
type="button"
|
||||
icon={clipboard}
|
||||
title={t("buttons.copyToClipboard")}
|
||||
aria-label={t("buttons.copyToClipboard")}
|
||||
onClick={() => onExportToClipboard(exportedElements, scale)}
|
||||
icon={downloadFile}
|
||||
title={t("buttons.exportToPng")}
|
||||
aria-label={t("buttons.exportToPng")}
|
||||
onClick={() => onExportToPng(exportedElements, scale)}
|
||||
ref={pngButton}
|
||||
/>
|
||||
)}
|
||||
<ToolButton
|
||||
type="button"
|
||||
icon={link}
|
||||
title={t("buttons.getShareableLink")}
|
||||
aria-label={t("buttons.getShareableLink")}
|
||||
onClick={() => onExportToBackend(exportedElements)}
|
||||
/>
|
||||
</Stack.Row>
|
||||
<ToolButton
|
||||
type="button"
|
||||
icon={svgFile}
|
||||
title={t("buttons.exportToSvg")}
|
||||
aria-label={t("buttons.exportToSvg")}
|
||||
onClick={() => onExportToSvg(exportedElements, scale)}
|
||||
/>
|
||||
{probablySupportsClipboard && (
|
||||
<ToolButton
|
||||
type="button"
|
||||
icon={clipboard}
|
||||
title={t("buttons.copyToClipboard")}
|
||||
aria-label={t("buttons.copyToClipboard")}
|
||||
onClick={() => onExportToClipboard(exportedElements, scale)}
|
||||
/>
|
||||
)}
|
||||
<ToolButton
|
||||
type="button"
|
||||
icon={link}
|
||||
title={t("buttons.getShareableLink")}
|
||||
aria-label={t("buttons.getShareableLink")}
|
||||
onClick={() => onExportToBackend(exportedElements)}
|
||||
/>
|
||||
</Stack.Row>
|
||||
</Stack.Col>
|
||||
|
||||
{actionManager.renderAction(
|
||||
"changeProjectName",
|
||||
|
@ -172,7 +174,7 @@ function ExportModal({
|
|||
)}
|
||||
<Stack.Col gap={1}>
|
||||
<div className="ExportDialog__scales">
|
||||
<Stack.Row gap={1} align="baseline">
|
||||
<Stack.Row gap={2} align="baseline">
|
||||
{scales.map(s => (
|
||||
<ToolButton
|
||||
key={s}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue