react-component / react-component/menu

Expanded icon for Horizantal Mode

Open
#245 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
701
Forks
266
Avg merge
4d 11h
Merged PRs (30d)
3

Description

// expand custom icon should NOT be displayed in menu with horizontal mode.
let icon = null;
if (props.mode !== 'horizontal') {
icon = this.props.expandIcon; // ReactNode
if (typeof this.props.expandIcon === 'function') {
icon = React.createElement(
this.props.expandIcon,
{ ...this.props }
);
}
}

Why don't render icon for horizontal mode.
I think it should be good to have possibility to change icon for horizontal mode.
What about screen shoot from you "read me" page? How did you render icon?

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the horizontal-mode branch shown in the issue and inspect how expandIcon is handled for the other menu modes. Use the README screenshot and the requested behavior to determine how a custom icon should render in horizontal mode, then verify that the icon appears when configured without changing existing modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.