fix bg color picker rendered behind shape menu (#1445)
* fix bg color picker rendered behind shape menu * add comment
This commit is contained in:
parent
c35d76cb4c
commit
8cfc64a3ab
@ -5,4 +5,5 @@
|
|||||||
box-shadow: var(--shadow-island);
|
box-shadow: var(--shadow-island);
|
||||||
border-radius: var(--border-radius-m);
|
border-radius: var(--border-radius-m);
|
||||||
padding: calc(var(--padding) * var(--space-factor));
|
padding: calc(var(--padding) * var(--space-factor));
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
@ -6,13 +6,14 @@ type IslandProps = {
|
|||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
padding?: number;
|
padding?: number;
|
||||||
className?: string;
|
className?: string;
|
||||||
|
style?: object;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Island = React.forwardRef<HTMLDivElement, IslandProps>(
|
export const Island = React.forwardRef<HTMLDivElement, IslandProps>(
|
||||||
({ children, padding, className }, ref) => (
|
({ children, padding, className, style }, ref) => (
|
||||||
<div
|
<div
|
||||||
className={`${className ?? ""} Island`}
|
className={`${className ?? ""} Island`}
|
||||||
style={{ "--padding": padding } as React.CSSProperties}
|
style={{ "--padding": padding, ...style } as React.CSSProperties}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
@ -125,7 +125,9 @@ export const LayerUI = React.memo(
|
|||||||
<div className="App-menu App-menu_top">
|
<div className="App-menu App-menu_top">
|
||||||
<Stack.Col gap={4}>
|
<Stack.Col gap={4}>
|
||||||
<Section heading="canvasActions">
|
<Section heading="canvasActions">
|
||||||
<Island padding={4}>
|
{/* the zIndex ensures this menu has higher stacking order,
|
||||||
|
see https://github.com/excalidraw/excalidraw/pull/1445 */}
|
||||||
|
<Island padding={4} style={{ zIndex: 1 }}>
|
||||||
<Stack.Col gap={4}>
|
<Stack.Col gap={4}>
|
||||||
<Stack.Row gap={1} justifyContent={"space-between"}>
|
<Stack.Row gap={1} justifyContent={"space-between"}>
|
||||||
{actionManager.renderAction("loadScene")}
|
{actionManager.renderAction("loadScene")}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user