27 lines
617 B
React
27 lines
617 B
React
import { RiExpandDiagonal2Line } from "react-icons/ri";
|
|||
|
|
import React from "react";
|
||
|
|
|
||
|
|
const CustomResizeHandle = React.forwardRef((props, ref) => {
|
||
|
|
const { handleAxis, isVisable, ...restProps } = props;
|
||
|
|
if (!isVisable) return null;
|
||
|
|
return (
|
||
|
|
<div
|
||
|
|
ref={ref}
|
||
|
|
{...restProps}
|
||
|
|
className={`resize-hande-${handleAxis}`}
|
||
|
|
style={{
|
||
|
|
position: 'absolute',
|
||
|
|
bottom: 0,
|
||
|
|
right: 0,
|
||
|
|
cursor: "pointer",
|
||
|
|
width: "20px",
|
||
|
|
height: "20px",
|
||
|
|
zIndex: "1",
|
||
|
|
}}
|
||
|
|
>
|
||
|
|
<RiExpandDiagonal2Line />
|
||
|
|
</div>
|
||
|
|
);
|
||
|
|
});
|
||
|
|
|
||
|
|
export default CustomResizeHandle;
|