// Test file for react-mdl Definition file /// import * as React from 'react'; import {Badge, FABButton, Button, IconButton, Card, CardActions, CardTitle, CardText, CardMenu, CardMedia, Checkbox, DataTable, TableHeader, Table, Dialog, DialogTitle, DialogContent, DialogActions, Grid, Cell, Icon, IconToggle, Layout, Header, Navigation, Drawer, Content, HeaderRow, HeaderTabs, Footer, FooterDropDownSection, FooterLinkList, FooterSection, List, ListItem, ListItemContent, ListItemAction, Menu, MenuItem, ProgressBar, RadioGroup, Radio, Slider, Snackbar, Spinner, Switch, Tabs, Tab, Textfield, Tooltip} from 'react-mdl'; // all tests are from the examples provided here: https://tleunen.github.io/react-mdl/ // Badge tests React.createClass({ render: function() { return (
{/* Number badge on icon */} {/* Icon badge on icon */} {/* Number badge on text */} Inbox {/* Icon badge without background on text */} Mood
); } }); // Button tests React.createClass({ render: function() { return (
{/* Colored FAB button */} {/* Colored FAB button with ripple */} {/* FAB button */} {/* FAB button with ripple */} {/* Disabled FAB button */} {/* Mini FAB button */} {/* Colored Mini FAB button */} {/* Raised button */} {/* Raised button with ripple */} {/* Disabled Raised button */} {/* Colored Raised button */} {/* Accent-colored button without ripple */} {/* Accent-colored button with ripple */} {/* Flat button */} {/* Flat button with ripple */} {/* Disabled flat button */} {/* Primary colored flat button */} {/* Accent-colored flat button */} {/* Icon button */} {/* Colored Icon button */}
); } }) // Card tests React.createClass({ render: function() { return (
Welcome Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sagittis pellentesque lacus eleifend lacinia... Update Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenan convallis. Image.jpg

Featured event:
May 24, 2016
7-11pm

); } }); // Checkbox tests React.createClass({ render: function() { return (
); } }); // DataTable tests React.createClass({ render: function() { return (
Material Quantity `\$${price.toFixed(2)}`} tooltip="Price pet unit">Price Material Quantity `\$${price.toFixed(2)}`} tooltip="Price pet unit">Price (isAsc ? a : b).match(/\((.*)\)/)[1].localeCompare((isAsc ? b : a).match(/\((.*)\)/)[1])} tooltip="The amazing material name" > Material Quantity `\$${price.toFixed(2)}`} tooltip="Price pet unit" > Price
); } }); // Dialog tests React.createClass({ render: function() { return (
Allow data collection?

Allowing us to collect data will let us get you the information you want faster.

Allow this site to collect usage data to improve your experience?

Allowing us to collect data will let us get you the information you want faster.

Allow data collection?

Allowing us to collect data will let us get you the information you want faster.

); } }); // Grid tests React.createClass({ render: function() { return (
1 1 1 1 1 1 1 1 1 1 1 1 4 4 4 6 4 2 6 (8 tablet) 4 (6 tablet) 2 (4 phone)
); } }); // IconToggle tests React.createClass({ render: function() { return (
); } }); // Layout tests React.createClass({ render: function() { return (
{/* Uses a transparent header that draws on top of the layout's background */}
Link Link Link Link
Link Link Link Link
{/* No header, and the drawer stays open on larger screens (fixed drawer). */}
Link Link Link Link
{/* Always shows a header, even in smaller screens. */}
Area / The Title}> Link Link Link Link
Link Link Link Link
{/* The drawer is always open in large screens. The header is always shown, even in small screens. */}
{}} label="Search" expandable expandableIcon="search" />
Link Link Link Link
{/* Uses a header that scrolls with the text, rather than staying locked at the top */}
Link Link Link Link
Link Link Link Link
{/* Uses a header that contracts as the page scrolls down. */}
{}} label="Search" expandable expandableIcon="search" /> Link Link Link Link
Link Link Link Link
{/* Hide the top part of the header when scrolling down */}
{}} label="Search" expandable expandableIcon="search" /> Link Link Link Link
Link Link Link Link
this.setState({ activeTab: tabId })}> Tab1 Tab2 Tab3 Tab4 Tab5 Tab6
Content for the tab: {this.state.activeTab}
{/* Simple header with fixed tabs. */}
{}}> Tab1 Tab2 Tab3
You can add logic to update the content of this container based on the "activeTab" receive in the `onChange` callback.
); } }); // List tests React.createClass({ render: function() { return (
Bryan Cranston Aaron Paul Bob Odenkirk Bryan Cranston Aaron Paul Bob Odenkirk Bryan Cranston Aaron Paul Bob Odenkirk Bryan Cranston Aaron Paul Bob Odenkirk Bryan Cranston Aaron Paul Bob Odenkirk Bryan Cranston Aaron Paul Bob Odenkirk
); } }); // Menu tests React.createClass({ render: function() { return (
{/* Lower left */}
Some Action Another Action Disabled Action Yet Another Action
{/* Lower right */}
Some Action Another Action Disabled Action Yet Another Action
{/* Top left */}
Some Action Another Action Disabled Action Yet Another Action
{/* Top right */}
Some Action Another Action Disabled Action Yet Another Action
); } }); // ProgressBar tests React.createClass({ render: function() { return (
{/* Simple Progress Bar */} {/* Progress Bar with Indeterminate Progress */} {/* Progress Bar with Buffering */}
); } }); // Radio tests React.createClass({ render: function() { return (
Ripple option Other option Ripple option Other option
); } }); // Slider tests React.createClass({ render: function() { return (
{/* Default slider */} {/* Slider with initial value */}
); } }); // Snackbar tests React.createClass({ render: function() { return (
Button color changed.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce varius luctus quam. Fusce quis blandit libero. Donec accumsan nunc lectus, vel blandit diam bibendum ac. Integer faucibus, lorem et convallis fermentum, diam dolor imperdiet mi, nec iaculis risus mauris id elit. Vivamus vel eros dapibus, molestie ante ut, vestibulum sem.
); } }); // Spinner tests React.createClass({ render: function() { return (
{/* Simple spinner */} {/* Single color spinner */}
); } }); // Switch tests React.createClass({ render: function() { return (
Ripple switch Switch
); } }); // Tab tests React.createClass({ render: function() { return (
this.setState({ activeTab: tabId })} ripple> Starks Lannisters Targaryens
Content for the tab: {this.state.activeTab}
); } }); // Textfield tests React.createClass({ render: function() { return (
{/* Simple textfield */} {}} label="Text..." style={{width: '200px'}} /> {/* Numeric textfield */} {}} pattern="-?[0-9]*(\.[0-9]+)?" error="Input is not a number!" label="Number..." style={{width: '200px'}} /> {/* Textfield with floating label */} {}} label="Text..." floatingLabel style={{width: '200px'}} /> {/* Numeric Textfield with floating label */} {}} pattern="-?[0-9]*(\.[0-9]+)?" error="Input is not a number!" label="Number..." floatingLabel />
); } }); // Tooltip tests React.createClass({ render: function() { return (
{/* Simple tooltip */} {/* Large Tooltip */} {/* Rich Tooltip */} Upload file.zip}> {/* Multiline Tooltip */} Share your content
via social media}>
{/* Right Tooltip */} {/* Left Tooltip */} {/* Top Tooltip */} {/* Bottom Tooltip */}
); } });