-
-
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.
Render fix and new scollable example
* New scrollable tab example added * Fix for (at least 50% of the time) for calculating widths in componentDidMount via requestAnimationFrame. But still the tab container width differs between reloads.
- Loading branch information
1 parent
600eb41
commit a084f7c
Showing
3 changed files
with
203 additions
and
18 deletions.
There are no files selected for viewing
176 changes: 176 additions & 0 deletions
176
docs/src/app/components/pages/components/Tabs/ExampleScrollable.jsx
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,176 @@ | ||
import React from 'react'; | ||
import Tabs from 'material-ui/lib/tabs/tabs'; | ||
import Tab from 'material-ui/lib/tabs/tab'; | ||
import Slider from 'material-ui/lib/slider'; | ||
|
||
const styles = { | ||
headline: { | ||
fontSize: 24, | ||
paddingTop: 16, | ||
marginBottom: 12, | ||
fontWeight: 400, | ||
}, | ||
}; | ||
|
||
const TabsExampleScrollable = () => ( | ||
<Tabs> | ||
<Tab label="Item One" > | ||
<div> | ||
<h2 style={styles.headline}>Tab One Template Example</h2> | ||
<p> | ||
This is an example of a tab template! | ||
</p> | ||
<p> | ||
You can put any sort of HTML or react component in here. It even keeps the component state! | ||
</p> | ||
<Slider name="slider0" defaultValue={0.5} /> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Two" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Two Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Three" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Three Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Four" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Four Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Five" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Five Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Six" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Six Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Seven" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Seven Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Eight" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Eight Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Nine" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Nine Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Ten" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Ten Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Eleven" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Eleven Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Twelve" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Twelve Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Thirteen" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Thirteen Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Fourteen" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Fourteen Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Fifteen" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Fifteen Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Sixteen" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Sixteen Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Seventeen" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Seventeen Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Eighteen" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Eighteen Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
<Tab label="Item Nineteen" > | ||
<div> | ||
<h2 style={styles.headline}>Tab Nineteen Template Example</h2> | ||
<p> | ||
This is another example of a tab template! | ||
</p> | ||
</div> | ||
</Tab> | ||
</Tabs> | ||
); | ||
|
||
export default TabsExampleScrollable; |
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