Skip to content

Conversation

@deepanshu2506
Copy link
Contributor

@deepanshu2506 deepanshu2506 commented Oct 2, 2021

close #11653

added a prop to tab component that specifies the icon position as "top" , "left", "bottom" or "right"

Default position is top.

@mui-pr-bot
Copy link

mui-pr-bot commented Oct 2, 2021

Details of bundle changes

@material-ui/core: parsed: +0.09% , gzip: +0.07%
@material-ui/lab: parsed: +0.11% , gzip: +0.08%

Generated by 🚫 dangerJS against b2a362a

@deepanshu2506
Copy link
Contributor Author

@oliviertassinari please review

@deepanshu2506 deepanshu2506 changed the title support iconPosition added in Tabs [Tab] support iconPosition added in Tabs Oct 6, 2021
@deepanshu2506 deepanshu2506 changed the title [Tab] support iconPosition added in Tabs [Tab] iconPosition prop added in Tab Oct 6, 2021
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 8, 2021
@siriwatknp
Copy link
Member

@deepanshu2506 Thanks for the PR. However, I am hesitant about it because in v5 you can do it via sx prop which I think is more flexible. https://codesandbox.io/s/iconlabeltabs-material-demo-forked-degj9?file=/demo.js

By adding API for the sake of styling which does not include in the guideline, it increases the maintenance afford in the future.

cc @mui-org/core for more opinions.

@hbjORbj
Copy link
Contributor

hbjORbj commented Oct 11, 2021

@deepanshu2506 In your current implementation, iconPosition prop is meaningful if only if it is used together with label prop. While I understand that it's not a common use case to place icon at a certain position without label, I think that the prop name can be misleading.

@deepanshu2506
Copy link
Contributor Author

So should this PR be carried forward or not?

@siriwatknp
Copy link
Member

So should this PR be carried forward or not?

Let's wait for comments from other people for a few days.

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, the API is pretty common so I would say it's a nice addition. Both positions of the icons (start and top) can be found on the Material Design guidlines.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 13, 2021
@siriwatknp siriwatknp added the PR: needs test The pull request needs tests. label Oct 19, 2021
@siriwatknp
Copy link
Member

siriwatknp commented Oct 19, 2021

To move forward, I think this PR needs

  • a demo playground (let's show all positions at once to leverage visual regression test)

Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 This is a great improvement!

@siriwatknp siriwatknp added scope: tabs Changes related to the tabs. type: new feature Expand the scope of the product to solve a new problem. and removed PR: needs test The pull request needs tests. labels Oct 19, 2021
Co-authored-by: Marija Najdova <mnajdova@gmail.com>
@mnajdova mnajdova merged commit d28af90 into mui:master Oct 20, 2021
@mnajdova
Copy link
Member

@deepanshu2506 it's a great first pull request on MUI 👌 Thank you for working on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: tabs Changes related to the tabs. type: new feature Expand the scope of the product to solve a new problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Tabs] Add support for prefix icons

5 participants