Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Commit

Permalink
removes jsx boolean values
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommy Leunen committed Oct 18, 2015
1 parent f0fdb72 commit 52520fa
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"strict": [2, "global"],

"react/display-name": 0,
"react/jsx-boolean-value": [2, "always"],
"react/jsx-boolean-value": [2, "never"],
"react/jsx-no-undef": 2,
"react/jsx-sort-props": 0,
"react/jsx-sort-prop-types": 2,
Expand Down
30 changes: 15 additions & 15 deletions demo/button/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ class Demo extends React.Component {
<div>
<h1>Colored FAB Button</h1>
<p>Colored FAB button</p>
<FABButton colored={true} ripple={false}>
<FABButton colored ripple={false}>
<Icon name="add" />
</FABButton>
<p>Colored FAB button with ripple</p>
<FABButton colored={true}>
<FABButton colored>
<Icon name="add" />
</FABButton>

Expand All @@ -29,54 +29,54 @@ class Demo extends React.Component {
<Icon name="add" />
</FABButton>
<p>Disabled FAB Button</p>
<FABButton disabled={true}>
<FABButton disabled>
<Icon name="add" />
</FABButton>


<h1>Raised Button</h1>
<p>Raised button</p>
<Button raised={true} ripple={false}>Button</Button>
<Button raised ripple={false}>Button</Button>
<p>Raised button with ripple</p>
<Button raised={true}>Button</Button>
<Button raised>Button</Button>
<p>Raised disabled button</p>
<Button raised={true} disabled={true}>Button</Button>
<Button raised disabled>Button</Button>

<h1>Colored Raised Button</h1>
<p>Raised button</p>
<Button raised={true} colored={true} ripple={false}>Button</Button>
<Button raised colored ripple={false}>Button</Button>
<p>Accent-colored raised button</p>
<Button raised={true} accent={true} ripple={false}>Button</Button>
<Button raised accent ripple={false}>Button</Button>
<p>Accent-colored raised button with ripple</p>
<Button raised={true} accent={true}>Button</Button>
<Button raised accent>Button</Button>

<h1>Flat button</h1>
<p>Flat button</p>
<Button ripple={false}>Button</Button>
<p>Flat button with ripple</p>
<Button>Button</Button>
<p>Disabled Flat button</p>
<Button disabled={true}>Button</Button>
<Button disabled>Button</Button>

<h1>Colored Flat button</h1>
<p>Primary-colored Flat button</p>
<Button primary={true} ripple={false}>Button</Button>
<Button primary ripple={false}>Button</Button>
<p>Accent-colored flat button</p>
<Button accent={true} ripple={false}>Button</Button>
<Button accent ripple={false}>Button</Button>

<h1>Icon Button</h1>
<p>Icon button</p>
<IconButton name="mood" ripple={false} />
<p>Colored Icon button</p>
<IconButton name="mood" colored={true} ripple={false} />
<IconButton name="mood" colored ripple={false} />

<h1>Mini FAB Button</h1>
<p>Mini FAB Button</p>
<FABButton mini={true}>
<FABButton mini>
<Icon name="add" />
</FABButton>
<p>Colored Mini FAB Button</p>
<FABButton mini={true} colored={true}>
<FABButton mini colored>
<Icon name="add" />
</FABButton>
</div>
Expand Down
18 changes: 9 additions & 9 deletions demo/card/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class Demo extends React.Component {
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Mauris sagittis pellentesque lacus eleifend lacinia...
</CardText>
<CardActions border={true}>
<Button colored={true}>Get Started</Button>
<CardActions border>
<Button colored>Get Started</Button>
</CardActions>
<CardMenu style={{color: '#fff'}}>
<IconButton name="share" />
Expand All @@ -26,19 +26,19 @@ class Demo extends React.Component {

<p>Square card</p>
<Card shadowLevel={0} style={{width: '320px', height: '320px'}}>
<CardTitle expand={true} style={{color: '#fff', background: 'url(http://www.getmdl.io/assets/demos/dog.png) bottom right 15% no-repeat #46B6AC'}}>Update</CardTitle>
<CardTitle expand style={{color: '#fff', background: 'url(http://www.getmdl.io/assets/demos/dog.png) bottom right 15% no-repeat #46B6AC'}}>Update</CardTitle>
<CardText>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Aenan convallis.
</CardText>
<CardActions border={true}>
<Button colored={true}>View Updates</Button>
<CardActions border>
<Button colored>View Updates</Button>
</CardActions>
</Card>

<p>Image card</p>
<Card shadowLevel={0} style={{width: '256px', height: '256px', background: 'url(http://www.getmdl.io/assets/demos/image_card.jpg) center / cover'}}>
<CardTitle expand={true} />
<CardTitle expand />
<CardActions style={{height: '52px', padding: '16px', background: 'rgba(0,0,0,0.2)'}}>
<span style={{color: '#fff', fontSize: '14px', fontWeight: '500'}}>
Image.jpg
Expand All @@ -49,15 +49,15 @@ class Demo extends React.Component {

<p>Event card</p>
<Card shadowLevel={0} style={{width: '256px', height: '256px', background: '#3E4EB8'}}>
<CardTitle expand={true} style={{alignItems: 'flex-start', color: '#fff'}}>
<CardTitle expand style={{alignItems: 'flex-start', color: '#fff'}}>
<h4 style={{marginTop: '0'}}>
Featured event:<br />
May 24, 2016<br />
7-11pm
</h4>
</CardTitle>
<CardActions border={true} style={{borderColor: 'rgba(255, 255, 255, 0.2)', display: 'flex', boxSizing: 'border-box', alignItems: 'center', color: '#fff'}}>
<Button colored={true} style={{color: '#fff'}}>Add to Calendar</Button>
<CardActions border style={{borderColor: 'rgba(255, 255, 255, 0.2)', display: 'flex', boxSizing: 'border-box', alignItems: 'center', color: '#fff'}}>
<Button colored style={{color: '#fff'}}>Add to Calendar</Button>
<div className="mdl-layout-spacer"></div>
<Icon name="event" />
</CardActions>
Expand Down
2 changes: 1 addition & 1 deletion demo/datatable/datatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Demo extends React.Component {

return (
<div>
<DataTable columns={columns} data={data} selectable={true} />
<DataTable columns={columns} data={data} selectable />
</div>
);
}
Expand Down
20 changes: 10 additions & 10 deletions demo/layout/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Demo extends React.Component {
<p>Uses a transparent header that draws on top of the layout's background</p>
<div style={{height: '300px', position: 'relative'}}>
<Layout style={{background: 'url(http://www.getmdl.io/assets/demos/transparent.jpg) center / cover'}}>
<Header transparent={true} title="Title" style={{color: 'white'}}>
<Header transparent title="Title" style={{color: 'white'}}>
<Navigation>
<a href="">Link</a>
<a href="">Link</a>
Expand All @@ -32,7 +32,7 @@ class Demo extends React.Component {

<p>No header, and the drawer stays open on larger screens (fixed drawer).</p>
<div style={{height: '300px', position: 'relative'}}>
<Layout fixedDrawer={true}>
<Layout fixedDrawer>
<Drawer title="Title">
<Navigation>
<a href="">Link</a>
Expand All @@ -47,7 +47,7 @@ class Demo extends React.Component {

<p>Always shows a header, even in smaller screens.</p>
<div style={{height: '300px', position: 'relative'}}>
<Layout fixedHeader={true}>
<Layout fixedHeader>
<Header title={<span><span style={{ color: '#ddd' }}>Area / </span><strong>The Title</strong></span>}>
<Navigation>
<a href="">Link</a>
Expand All @@ -71,13 +71,13 @@ class Demo extends React.Component {
<p>The drawer is always open in large screens. The header is always shown,
even in small screens.</p>
<div style={{height: '300px', position: 'relative'}}>
<Layout fixedHeader={true} fixedDrawer={true}>
<Layout fixedHeader fixedDrawer>
<Header title="Title">
<Textfield
value=""
onChange={() => {}}
label="Search"
expandable={true}
expandable
expandableIcon="search"
/>
</Header>
Expand All @@ -97,7 +97,7 @@ class Demo extends React.Component {
locked at the top</p>
<div className="big-content" style={{height: '300px', position: 'relative'}}>
<Layout>
<Header title="Title" scroll={true}>
<Header title="Title" scroll>
<Navigation>
<a href="">Link</a>
<a href="">Link</a>
Expand All @@ -122,13 +122,13 @@ class Demo extends React.Component {
<p>Uses a header that contracts as the page scrolls down.</p>
<div className="big-content" style={{height: '300px', position: 'relative'}}>
<Layout>
<Header waterfall={true}>
<Header waterfall>
<HeaderRow title="Title">
<Textfield
value=""
onChange={() => {}}
label="Search"
expandable={true}
expandable
expandableIcon="search"
/>
</HeaderRow>
Expand Down Expand Up @@ -157,7 +157,7 @@ class Demo extends React.Component {

<p>Simple header with scrollable tabs.</p>
<div style={{height: '300px', position: 'relative'}}>
<Layout fixedHeader={true}>
<Layout fixedHeader>
<Header>
<HeaderRow title="Title" />
<HeaderTabs>
Expand Down Expand Up @@ -195,7 +195,7 @@ class Demo extends React.Component {

<p>Simple header with fixed tabs.</p>
<div style={{height: '300px', position: 'relative'}}>
<Layout fixedHeader={true} fixedTabs={true}>
<Layout fixedHeader fixedTabs>
<Header>
<HeaderRow title="Title" />
<HeaderTabs>
Expand Down
4 changes: 2 additions & 2 deletions demo/loading/loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Demo extends React.Component {
<ProgressBar progress={44} />

<p>MDL Progress Bar with Indeterminate Progress</p>
<ProgressBar indeterminate={true} />
<ProgressBar indeterminate />

<p>MDL Progress Bar with Buffering</p>
<ProgressBar progress={33} buffer={87} />
Expand All @@ -20,7 +20,7 @@ class Demo extends React.Component {
<Spinner />

<p>MDL Spinner Component with Single Color</p>
<Spinner singleColor={true} />
<Spinner singleColor />
</div>
);
}
Expand Down
8 changes: 4 additions & 4 deletions demo/menu/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Demo extends React.Component {
<Menu target="demo-menu-lower-left">
<MenuItem>Some Action</MenuItem>
<MenuItem>Another Action</MenuItem>
<MenuItem disabled={true}>Disabled Action</MenuItem>
<MenuItem disabled>Disabled Action</MenuItem>
<MenuItem>Yet Another Action</MenuItem>
</Menu>

Expand All @@ -21,7 +21,7 @@ class Demo extends React.Component {
<Menu target="demo-menu-lower-right" align="right">
<MenuItem>Some Action</MenuItem>
<MenuItem>Another Action</MenuItem>
<MenuItem disabled={true}>Disabled Action</MenuItem>
<MenuItem disabled>Disabled Action</MenuItem>
<MenuItem>Yet Another Action</MenuItem>
</Menu>

Expand All @@ -30,7 +30,7 @@ class Demo extends React.Component {
<Menu target="demo-menu-top-left" valign="top">
<MenuItem>Some Action</MenuItem>
<MenuItem>Another Action</MenuItem>
<MenuItem disabled={true}>Disabled Action</MenuItem>
<MenuItem disabled>Disabled Action</MenuItem>
<MenuItem>Yet Another Action</MenuItem>
</Menu>

Expand All @@ -39,7 +39,7 @@ class Demo extends React.Component {
<Menu target="demo-menu-top-right" valign="top" align="right">
<MenuItem>Some Action</MenuItem>
<MenuItem>Another Action</MenuItem>
<MenuItem disabled={true}>Disabled Action</MenuItem>
<MenuItem disabled>Disabled Action</MenuItem>
<MenuItem>Yet Another Action</MenuItem>
</Menu>
</div>
Expand Down
2 changes: 1 addition & 1 deletion demo/tabs/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Demo extends React.Component {
return (
<div>
<p>With ripple</p>
<TabsDemo ripple={true} />
<TabsDemo ripple />

<p>Without ripple</p>
<TabsDemo ripple={false} />
Expand Down
6 changes: 3 additions & 3 deletions demo/textfield/textfield.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Demo extends React.Component {
value={this.state.textfield3}
onChange={linkToState(this, 'textfield3')}
label="Text..."
floatingLabel={true}
floatingLabel
style={{width: '200px'}}
/>

Expand All @@ -66,7 +66,7 @@ class Demo extends React.Component {
pattern="-?[0-9]*(\.[0-9]+)?"
error="Input is not a number!"
label="Number..."
floatingLabel={true}
floatingLabel
/>

<p>Floating Multiline Textfield</p>
Expand All @@ -83,7 +83,7 @@ class Demo extends React.Component {
value={this.state.textfield6}
onChange={linkToState(this, 'textfield6')}
label="Expandable Input"
expandable={true}
expandable
expandableIcon="search"
/>

Expand Down
2 changes: 1 addition & 1 deletion demo/tooltip/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Demo extends React.Component {
</Tooltip>

<p>Large Tooltip</p>
<Tooltip label="Print" large={true}>
<Tooltip label="Print" large>
<Icon name="print" />
</Tooltip>

Expand Down
4 changes: 2 additions & 2 deletions src/Footer/DropDownSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ class DropDownSection extends React.Component {

return (
<div className={classes} {...otherProps}>
<input className={`mdl-${size}-footer__heading-checkbox`} type="checkbox" defaultChecked={true} />
<input className={`mdl-${size}-footer__heading-checkbox`} type="checkbox" defaultChecked />
<h1 className={`mdl-${size}-footer__heading`}>{title}</h1>
{cloneChildren(this.props.children, { size: size })}
</div>
);
}
}

export default DropDownSection;
export default DropDownSection;
Loading

0 comments on commit 52520fa

Please sign in to comment.