How to use the @react-md/tree.defaultTreeItemRenderer function in @react-md/tree

To help you get started, we’ve selected a few @react-md/tree examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mlaursen / react-md / packages / documentation / components / Layout / NavigationTree.tsx View on Github external
) => {
  const { key } = itemProps;
  const { divider, subheader } = item;
  if (divider) {
    return ;
  }

  if (subheader) {
    return (
      
        {item.children}
      
    );
  }

  return defaultTreeItemRenderer(itemProps, item, treeProps);
};

@react-md/tree

A package for creating an accessible tree component following the tree role.

MIT
Latest version published 11 months ago

Package Health Score

69 / 100
Full package analysis