refactoring, linting, formatting
This commit is contained in:
27
src/components/PageWorkspace/DropIndicator.tsx
Normal file
27
src/components/PageWorkspace/DropIndicator.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import React from "react";
|
||||
|
||||
interface DropIndicatorProps {
|
||||
side: "left" | "right" | "end";
|
||||
color: string;
|
||||
}
|
||||
|
||||
const DropIndicator: React.FC<DropIndicatorProps> = ({ side, color }) => {
|
||||
const isEnd = side === "end";
|
||||
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
position: "absolute",
|
||||
left: side === "left" ? "-4px" : isEnd ? "8px" : undefined,
|
||||
right: side === "right" ? "-4px" : undefined,
|
||||
top: "4px",
|
||||
bottom: "4px",
|
||||
width: "3px",
|
||||
borderRadius: "999px",
|
||||
background: color,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default DropIndicator;
|
||||
Reference in New Issue
Block a user