snapshot of https://github.com/excalidraw/excalidraw.git (master, 2026-09-16; blobs > 131072B omitted)
Some checks failed
Tests / test (push) Failing after 15s

This commit is contained in:
upstream-mirror
2026-09-16 05:31:04 +05:00
commit 1a8d07ca6c
1286 changed files with 360144 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
import React from "react";
import clsx from "clsx";
import "./Island.scss";
import type { ViewportUIDock, ViewportUIName } from "../types";
type IslandProps = {
children: React.ReactNode;
padding?: number;
className?: string | boolean;
style?: object;
/** marks the island as a canvas-occluding UI surface measured by
* `getViewportOffsets` (see {@link ViewportUIDock}) */
"data-viewport-ui"?: ViewportUIDock;
/** identifies the surface so `getViewportOffsets` can reserve space for
* it while hidden (see {@link ViewportUIName}) */
"data-viewport-ui-name"?: ViewportUIName;
};
export const Island = React.forwardRef<HTMLDivElement, IslandProps>(
(
{
children,
padding,
className,
style,
"data-viewport-ui": viewportUI,
"data-viewport-ui-name": viewportUIName,
},
ref,
) => (
<div
className={clsx("Island", className)}
style={{ "--padding": padding, ...style }}
data-viewport-ui={viewportUI}
data-viewport-ui-name={viewportUIName}
ref={ref}
>
{children}
</div>
),
);