28 lines
586 B
TypeScript
28 lines
586 B
TypeScript
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;
|