import { register } from "@antv/x6-react-shape"; import { Node } from "@antv/x6"; import CustomInput from "../../CustomInput"; import { useSizeHook, useShapeProps } from "../../../hooks"; const component = ({ node }: { node: Node }) => { const { label, text, fill, stroke, opacity } = node.getData(); const { size, ref } = useSizeHook(); const { fillContent, defsContent, strokeColor, strokeWidth, strokeDasharray, } = useShapeProps(fill, size, stroke); const { width, height } = size || { width: 0, height: 0 }; return ( <>
{defsContent}
); }; register({ shape: "custom-react-sequenceLifeLine", width: 70, height: 140, effect: ["data"], component: component, }); const sequenceLifeLine = { name: "生命线", icon: require("./image/sequenceLifeLine.png"), node: { shape: "custom-react-sequenceLifeLine", data: { label: "", }, }, }; export default sequenceLifeLine;