iannbing / iannbing/react-simple-tree-menu

ItemComponent should have classname for isOpen

Open
#192 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
138
Forks
44
PR merge metrics
No merged PRs in 30d

Description

Following the examples on the README doc, one possible way to apply custom styles on a tree menu is to use the ItemComponent component.

The generated html `

  • ` tags have classNames for indicating active and focused states (rstm-tree-item--active and rstm-tree-item--focused) but dont include one for the isOpen state. [Here](https://github.com/iannbing/react-simple-tree-menu/blob/2d9990ab1b51c01dec701d8dd35f47bd5cd160af/src/TreeMenu/renderProps.tsx#L53-L54).

    It would be nice to have one extra className for making custom style for open tree items easier via css.

  • Contributor guide

    Open the contributing guide

    Assessment

    This issue has not been assessed yet.

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.