How to Pass nodes in custom toggle decorater
24thdiv opened this issue · 0 comments
24thdiv commented
I have custom Toggle create which has by default style props only. How can I pass nodes in this props?
const TreeToggle = props => {
const { style } = props;
console.log("toggle", props);
const { height, width } = style;
const midHeight = height * 0.5;
const points = `0,0 0,${height} ${width},${midHeight}`;
return (
<div style={style.base} onClick={props.onClick}>
<svg {...{ height, width }}>
<Polygon points={points} style={style.arrow} />
</svg>
</div>
);
};
export default TreeToggle;
Here I need to access node also.