Skip to content

Commit

Permalink
fix standard js indentation for conditional expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
lipp committed Oct 10, 2016
1 parent 1e21e24 commit 1d04fc7
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 20 deletions.
3 changes: 2 additions & 1 deletion components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export default class Header extends React.Component {
<span className='Header-title'>
{title}
</span>
{subtitle &&
{
subtitle &&
<span className='Header-subtitle'>
<Icon.ChevronRight className='Header-chevron' />
{subtitle}
Expand Down
9 changes: 6 additions & 3 deletions components/list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,20 @@ export const Row = ({
}
}

const avatarElement = avatar &&
const avatarElement =
avatar &&
<div className='List-row-avatar' key='avatar'>
{(typeof avatar === 'string' ? <img src={avatar} /> : avatar)}
</div>

const iconLeftElement = !avatar && icon &&
const iconLeftElement =
!avatar && icon &&
<div className='List-row-icon-left' key='icon-left'>
{icon}
</div>

const iconRightElement = avatar && icon &&
const iconRightElement =
avatar && icon &&
<div className='List-row-icon-right' key='icon-right'>
{icon}
</div>
Expand Down
3 changes: 2 additions & 1 deletion components/menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export function Menu ({items, children, visible, onClick, transformX, transformY
e.preventDefault()
onClick(item)
}}>
{hasIcon &&
{
hasIcon &&
<div className='Menu-icon'>
{item.icon}
</div>
Expand Down
3 changes: 2 additions & 1 deletion components/navigation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const Item = ({index, onClick, item}) => (
>
{item.text}
</Link>
{item.links &&
{
item.links &&
<ul className='Navigation'>
{item.links.map((item, index) =>
<Item
Expand Down
3 changes: 2 additions & 1 deletion components/progress/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class Linear extends React.Component {
render () {
return (
<Motion defaultStyle={{x: 0}} style={{x: spring(this.state.isDone ? 0 : 4)}}>
{(value) => value.x !== 0 &&
{
(value) => value.x !== 0 &&
<div className='Progress-linear'>
<div className='Progress-linear-background' style={{height: value.x}}>
<div className='Progress-linear-inner' style={{width: `${this.props.percentage}%`}} />
Expand Down
23 changes: 12 additions & 11 deletions components/select/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ export default class Select extends React.Component {

return (
<div className='Select' ref={(c) => { this.ref = c }}>
{label &&
{
label &&
<span className='Select-label'>{this.props.label}</span>
}
<button className='Select-body' onClick={this.open}>
Expand All @@ -100,16 +101,16 @@ export default class Select extends React.Component {
}}>
{style =>
open &&
<List
style={{
opacity: style.opacity
}}
hasLabel={!!this.props.label}
items={this.props.items}
selectedIndex={selectedIndex}
onClick={this.props.onChange}
width={this.state.width}
/>
<List
style={{
opacity: style.opacity
}}
hasLabel={!!this.props.label}
items={this.props.items}
selectedIndex={selectedIndex}
onClick={this.props.onChange}
width={this.state.width}
/>
}
</Motion>
</div>
Expand Down
3 changes: 2 additions & 1 deletion components/snackbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ var Snackbar = ({text, action, onAction, visible}) => (
<span className='Snackbar-text'>
{text}
</span>
{action &&
{
action &&
<input
type='button'
className='Snackbar-action'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"saucelabs": "^1.2.0",
"selenium-webdriver": "^3.0.0-beta-2",
"st": "^1.2.0",
"standard": "^7.0.1",
"standard": "^8.0.3",
"stylelint": "^7.3.1",
"stylelint-config-standard": "^13.0.2",
"tarball-extract": "0.0.3",
Expand Down

0 comments on commit 1d04fc7

Please sign in to comment.