Open 24thdiv opened 4 years ago
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.
I have custom Toggle create which has by default style props only. How can I pass nodes in this props?
Here I need to access node also.