Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tabs] Add a disabled property #6112

Merged
merged 3 commits into from
Feb 11, 2017
Merged

Conversation

irfanhudda
Copy link
Contributor

  • PR has tests / docs demo, and is linted.
  • Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
  • Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

Associated Issue: #1613

Summary of changes

  • Add disabled property to Tab component
  • Add example for disabled tab.
  • Modify Tab api doc.

Let me know if I missed something

src/Tabs/Tab.js Outdated
@@ -62,6 +62,10 @@ export default class Tab extends Component {
*/
className: PropTypes.string,
/**
* Disables the tab if set to true.
Copy link
Member

Choose a reason for hiding this comment

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

Please could you follow this pattern for prop naming?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out

@oliviertassinari
Copy link
Member

@irfanhudda Thanks for porting the PR. I'm wondering, shouldn't we need to change the style?
For instance with react-toolback:
capture d ecran 2017-02-11 a 00 22 34

@@ -31,3 +31,9 @@ Tab labels may be either all icons or all text.

{{demo='demos/tabs/IconTabs.js'}}
{{demo='demos/tabs/IconLabelTabs.js'}}

## Disabled Tab
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that we need a new example section for that. We could add a disable variation in one of the previous examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure which example to modify. There are four here

  1. Basic Tabs
  2. Full width Tabs
  3. Centered
  4. Icon Tabs

Can you point out which should be modified?

Copy link
Member

Choose a reason for hiding this comment

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

Actually, that sounds good to me like this 👍

@oliviertassinari oliviertassinari added next PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI component: tabs This is the name of the generic UI component, not the React module! and removed PR: Needs Review labels Feb 10, 2017
@irfanhudda
Copy link
Contributor Author

@oliviertassinari

I'm wondering, shouldn't we need to change the style?

Thanks for suggestion. I added some styles to disabled tab.

tab

@oliviertassinari oliviertassinari added PR: Review Accepted and removed PR: Needs Review PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI labels Feb 11, 2017
@oliviertassinari
Copy link
Member

I will update the regressions test once it's merged.

@oliviertassinari oliviertassinari changed the title [Tab] Add a disabled property [Tabs] Add a disabled property Feb 11, 2017
@mbrookes mbrookes merged commit 78e4274 into mui:next Feb 11, 2017
@irfanhudda irfanhudda deleted the disabled-tab-next branch February 11, 2017 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tabs This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants