Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

How to Pass nodes in custom toggle decorater #243

Open
24thdiv opened this issue Jan 31, 2020 · 0 comments
Open

How to Pass nodes in custom toggle decorater #243

24thdiv opened this issue Jan 31, 2020 · 0 comments
Labels
❓ question Further information is requested

Comments

@24thdiv
Copy link

24thdiv commented Jan 31, 2020

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.

@jimmyandrade jimmyandrade added the ❓ question Further information is requested label Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
❓ question Further information is requested
Development

No branches or pull requests

2 participants