mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
move to export dialog
This commit is contained in:
commit
90d68b3e0b
172 changed files with 21079 additions and 33179 deletions
|
@ -19,6 +19,9 @@ import { ToolButton } from "./ToolButton";
|
|||
const scales = [1, 2, 3];
|
||||
const defaultScale = scales.includes(devicePixelRatio) ? devicePixelRatio : 1;
|
||||
|
||||
const supportsContextFilters =
|
||||
"filter" in document.createElement("canvas").getContext("2d")!;
|
||||
|
||||
export const ErrorCanvasPreview = () => {
|
||||
return (
|
||||
<div>
|
||||
|
@ -128,6 +131,8 @@ const ExportModal = ({
|
|||
return (
|
||||
<div className="ExportDialog">
|
||||
<div className="ExportDialog__preview" ref={previewRef} />
|
||||
{supportsContextFilters &&
|
||||
actionManager.renderAction("exportWithDarkMode")}
|
||||
<Stack.Col gap={2} align="center">
|
||||
<div className="ExportDialog__actions">
|
||||
<Stack.Row gap={2}>
|
||||
|
@ -198,6 +203,7 @@ const ExportModal = ({
|
|||
</Stack.Row>
|
||||
</div>
|
||||
{actionManager.renderAction("changeExportBackground")}
|
||||
{actionManager.renderAction("toggleAutoSave")}
|
||||
{someElementIsSelected && (
|
||||
<div>
|
||||
<label>
|
||||
|
@ -252,6 +258,7 @@ export const ExportDialog = ({
|
|||
onClick={() => {
|
||||
setModalIsShown(true);
|
||||
}}
|
||||
data-testid="export-button"
|
||||
icon={exportFile}
|
||||
type="button"
|
||||
aria-label={t("buttons.export")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue