mirror of
https://github.com/status-im/react-native.git
synced 2025-01-19 14:02:10 +00:00
Merge pull request #2273 from vjeux/fix_az
[Website] Fix a-z order in props
This commit is contained in:
commit
50d5f86bf8
@ -144,9 +144,9 @@ var ComponentDoc = React.createClass({
|
|||||||
this.renderCompose(name)
|
this.renderCompose(name)
|
||||||
)}
|
)}
|
||||||
{Object.keys(props)
|
{Object.keys(props)
|
||||||
.sort((a, b) => {
|
.sort((nameA, nameB) => {
|
||||||
a = props[a];
|
var a = props[nameA];
|
||||||
b = props[b];
|
var b = props[nameB];
|
||||||
|
|
||||||
if (a.platforms && !b.platforms) {
|
if (a.platforms && !b.platforms) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -154,7 +154,13 @@ var ComponentDoc = React.createClass({
|
|||||||
if (b.platforms && !a.platforms) {
|
if (b.platforms && !a.platforms) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return a.name < b.name;
|
if (nameA < nameB) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (nameA > nameB) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
})
|
})
|
||||||
.map((name) =>
|
.map((name) =>
|
||||||
this.renderProp(name, props[name])
|
this.renderProp(name, props[name])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user