Skip to content

Commit bd1ef91

Browse files
committed
Merge pull request #29 from danez/tab-to-space
Replace all tabs with spaces
2 parents 1ad1031 + 81c7d67 commit bd1ef91

File tree

4 files changed

+132
-136
lines changed

4 files changed

+132
-136
lines changed

lib/components/Tab.js

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint indent:0 */
21
import React, {PropTypes} from 'react';
32

43
function syncNodeAttributes(node, props) {
@@ -15,7 +14,7 @@ function syncNodeAttributes(node, props) {
1514
}
1615

1716
module.exports = React.createClass({
18-
displayName: 'Tab',
17+
displayName: 'Tab',
1918

2019
propTypes: {
2120
id: PropTypes.string,
@@ -29,24 +28,24 @@ module.exports = React.createClass({
2928
])
3029
},
3130

32-
getDefaultProps() {
31+
getDefaultProps() {
3332
return {
34-
focus: false,
35-
selected: false,
36-
id: null,
37-
panelId: null
38-
};
39-
},
33+
focus: false,
34+
selected: false,
35+
id: null,
36+
panelId: null
37+
};
38+
},
4039

41-
componentDidMount() {
40+
componentDidMount() {
4241
syncNodeAttributes(this.getDOMNode(), this.props);
43-
},
42+
},
4443

45-
componentDidUpdate() {
44+
componentDidUpdate() {
4645
syncNodeAttributes(this.getDOMNode(), this.props);
47-
},
46+
},
4847

49-
render() {
48+
render() {
5049
return (
5150
<li
5251
role="tab"
@@ -59,5 +58,5 @@ module.exports = React.createClass({
5958
{this.props.children}
6059
</li>
6160
);
62-
}
61+
}
6362
});

lib/components/TabList.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
/* eslint indent:0 */
21
import React, {PropTypes} from 'react';
32

43
module.exports = React.createClass({
5-
displayName: 'TabList',
4+
displayName: 'TabList',
65

76
propTypes: {
87
children: PropTypes.oneOfType([
@@ -11,11 +10,11 @@ module.exports = React.createClass({
1110
])
1211
},
1312

14-
render() {
13+
render() {
1514
return (
1615
<ul role="tablist">
1716
{this.props.children}
1817
</ul>
1918
);
20-
}
19+
}
2120
});

lib/components/TabPanel.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
/* eslint indent:0 */
21
import React, {PropTypes} from 'react';
32

43
module.exports = React.createClass({
5-
displayName: 'TabPanel',
4+
displayName: 'TabPanel',
65

76
propTypes: {
87
selected: PropTypes.bool,
@@ -19,15 +18,15 @@ module.exports = React.createClass({
1918
forceRenderTabPanel: PropTypes.bool
2019
},
2120

22-
getDefaultProps() {
21+
getDefaultProps() {
2322
return {
24-
selected: false,
25-
id: null,
26-
tabId: null
27-
};
28-
},
23+
selected: false,
24+
id: null,
25+
tabId: null
26+
};
27+
},
2928

30-
render() {
29+
render() {
3130
const children = (this.context.forceRenderTabPanel || this.props.selected) ?
3231
this.props.children :
3332
null;
@@ -42,5 +41,5 @@ module.exports = React.createClass({
4241
{children}
4342
</div>
4443
);
45-
}
44+
}
4645
});

0 commit comments

Comments
 (0)