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

How to Pass nodes in custom toggle decorater #243

@24thdiv

Description

@24thdiv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ❓ questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions