-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6112 from irfanhudda/disabled-tab-next
[Tabs] Add a disabled property
- Loading branch information
Showing
4 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// @flow weak | ||
/* eslint-disable react/no-multi-comp */ | ||
|
||
import React, { Component } from 'react'; | ||
import customPropTypes from 'material-ui/utils/customPropTypes'; | ||
import Paper from 'material-ui/Paper'; | ||
import Tabs from 'material-ui/Tabs'; | ||
import Tab from 'material-ui/Tabs/Tab'; | ||
|
||
export default class DisabledTabs extends Component { | ||
static contextTypes = { | ||
styleManager: customPropTypes.muiRequired, | ||
}; | ||
|
||
state = { | ||
index: 1, | ||
}; | ||
|
||
handleChange = (event, index) => { | ||
this.setState({ index }); | ||
}; | ||
|
||
render() { | ||
return ( | ||
<Paper> | ||
<Tabs index={this.state.index} onChange={this.handleChange}> | ||
<Tab label="Disabled" disabled /> | ||
<Tab label="Active" /> | ||
<Tab label="Disabled" disabled /> | ||
<Tab label="Active" /> | ||
</Tabs> | ||
</Paper> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters