Skip to content

Commit

Permalink
update standard
Browse files Browse the repository at this point in the history
  • Loading branch information
zemirco committed Jan 5, 2018
1 parent a8356e3 commit c7480dc
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 35 deletions.
6 changes: 3 additions & 3 deletions examples/src/listRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ export default class ListRoute extends React.Component {
primary='Alice'
secondary='This is Alice.'
avatar='img/alice.jpg'
/>
/>
<Row
primary='John'
secondary='This is John.'
avatar='img/john.jpg'
/>
/>
<Row
primary='Steve'
secondary={'This is Steve.'}
avatar='img/steve.jpg'
/>
/>
</List>
</section>
<section>
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"react-dom": "^15.6.1",
"react-router-dom": "^4.2.2",
"react-test-renderer": "^15.6.1",
"standard": "^10.0.3",
"standard": "^11.0.0-beta.0",
"stylelint": "^8.2.0",
"stylelint-config-recommended-scss": "^2.0.0",
"stylelint-config-standard": "^17.0.0",
Expand Down Expand Up @@ -91,7 +91,8 @@
"ignore": [
"es/",
"src/js/icon/index.js",
"build/"
"build/",
"bin/gen.js"
]
}
}
2 changes: 1 addition & 1 deletion src/js/bottomnavigation/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe('BottomNavigation', () => {
<Route path='/two' component={() => <h1>Two</h1>} />
</BottomNavigation>
</MemoryRouter>
)
)
const node = wrapper.find('.mdc-BottomNavigation-content').at(0).instance()
node.scrollTop = 40
wrapper.find('.mdc-BottomNavigation').at(0).simulate('scroll', {})
Expand Down
16 changes: 8 additions & 8 deletions src/js/chip/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ export default class Chip extends React.Component {
}

const Element = ({
autoFocus,
icon,
index,
onBlur,
onDelete,
onFocus,
text
}) => {
autoFocus,
icon,
index,
onBlur,
onDelete,
onFocus,
text
}) => {
const textStyle = {
marginLeft: icon ? 8 : 12,
marginRight: onDelete ? 0 : 12
Expand Down
2 changes: 1 addition & 1 deletion src/js/list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const Row = ({
secondary,
style,
subheader
}) => {
}) => {
const onKeyDown = (event) => {
if (event.which === keycode('down') && event.target.nextSibling) {
event.preventDefault()
Expand Down
4 changes: 2 additions & 2 deletions src/js/radiobutton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ class RadioButton extends React.Component {
onKeyUp={this.setKbPressed}
onClick={this.resetKbPressed}
onBlur={this.resetKbPressed}
>
>
{items.map((item, index) => {
var checked = item.toLowerCase() === selectedValue.toLowerCase()
return (
<label key={index}
className={classNames('mdc-RadioButton-item', {'mdc-RadioButton-item--keyboard': index === focusIndex && shouldFocus})}
>
>
<input
checked={checked}
className='mdc-RadioButton-input'
Expand Down
7 changes: 3 additions & 4 deletions src/js/stepper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ const StepLink = ({index, step, isActive}) => (
</div>
<StepLine />
</div>
<div className={classnames(
'Stepper-title-text-wrapper',
{'Stepper--error': step.error}
)}>
<div className={classnames('Stepper-title-text-wrapper', {
'Stepper--error': step.error
})}>
<div className='Stepper-title-text'>
{step.title}
</div>
Expand Down
20 changes: 10 additions & 10 deletions src/js/textfield/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,31 @@ const TextfieldWrapper = ({
<div className='mdc-Textfield-icon-wrapper'>
{
icon
? <div className='mdc-Textfield-icon'>{icon}</div>
: null
? <div className='mdc-Textfield-icon'>{icon}</div>
: null
}
<div className='mdc-Textfield-wrapper'>
{
suffix
? <div className='mdc-Textfield-suffix' ref={node => node && onSuffixSize(node.getClientRects()[0])} >{suffix}</div>
: null
? <div className='mdc-Textfield-suffix' ref={node => node && onSuffixSize(node.getClientRects()[0])} >{suffix}</div>
: null
}
{children}
<span
className={classnames('mdc-Textfield-label', {
'mdc-Textfield-label--floatup': (!float || !empty)},
{'mdc-Textfield-error': showCounter}
)}
'mdc-Textfield-label--floatup': (!float || !empty),
'mdc-Textfield-error': showCounter
})}
>
{label}
</span>
<div className='mdc-Textfield-states'>
<span className='mdc-Textfield-error'>{error}</span>
{
length
? <span className={classnames('mdc-Textfield-char-counter', {
'mdc-Textfield-error': showCounter})}>{valueLength} / {length}</span>
: null
? <span className={classnames('mdc-Textfield-char-counter', {
'mdc-Textfield-error': showCounter})}>{valueLength} / {length}</span>
: null
}
</div>
</div>
Expand Down
10 changes: 6 additions & 4 deletions src/js/tooltip/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ export default class Tooltip extends React.Component {
ref: 'content'
})
)}
<div className={classnames(
'Tooltip',
{'is-active': this.state.visible})}
ref={(component) => { this.tooltipRef = component }} style={{left}}
<div
className={classnames('Tooltip', {
'is-active': this.state.visible
})}
ref={(component) => { this.tooltipRef = component }}
style={{left}}
>
{this.props.content}
</div>
Expand Down

0 comments on commit c7480dc

Please sign in to comment.