Skip to content

Commit 2ea2ee9

Browse files
authored
Update col.js
1 parent 1cb0a70 commit 2ea2ee9

File tree

1 file changed

+18
-26
lines changed

1 file changed

+18
-26
lines changed

src/components/layout/col.js

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,35 +57,26 @@ export default (resolve, reject) => {
5757
})
5858

5959
// Supports classes like: .col-sm, .col-md-6, .col-lg-auto
60-
const breakpointCol = breakpoints.filter(Boolean).reduce(
61-
(propMap, breakpoint) => {
62-
if (breakpoint) {
63-
// We filter out the '' breakpoint (xs), as making a prop name ''
64-
// would not work. The `cols` prop is used for `xs`
65-
propMap[breakpoint] = boolStrNum()
66-
}
67-
return propMap
68-
},
69-
create(null)
70-
)
60+
const breakpointCol = breakpoints.filter(Boolean).reduce((propMap, breakpoint) => {
61+
if (breakpoint) {
62+
// We filter out the '' breakpoint (xs), as making a prop name ''
63+
// would not work. The `cols` prop is used for `xs`
64+
propMap[breakpoint] = boolStrNum()
65+
}
66+
return propMap
67+
}, create(null))
7168

7269
// Supports classes like: .offset-3, .offset-md-1, .offset-lg-12
73-
const breakpointOffset = breakpoints.reduce(
74-
(propMap, breakpoint) => {
75-
propMap[suffixPropName(breakpoint, 'offset')] = strNum()
76-
return propMap
77-
},
78-
create(null)
79-
)
70+
const breakpointOffset = breakpoints.reduce((propMap, breakpoint) => {
71+
propMap[suffixPropName(breakpoint, 'offset')] = strNum()
72+
return propMap
73+
}, create(null))
8074

8175
// Supports classes like: .order-3, .order-md-1, .order-lg-12
82-
const breakpointOrder = breakpoints.reduce(
83-
(propMap, breakpoint) => {
84-
propMap[suffixPropName(breakpoint, 'order')] = strNum()
85-
return propMap
86-
},
87-
create(null)
88-
)
76+
const breakpointOrder = breakpoints.reduce((propMap, breakpoint) => {
77+
propMap[suffixPropName(breakpoint, 'order')] = strNum()
78+
return propMap
79+
}, create(null))
8980

9081
// For loop doesn't need to check hasOwnProperty
9182
// when using an object created from null
@@ -123,7 +114,8 @@ export default (resolve, reject) => {
123114
alignSelf: {
124115
type: String,
125116
default: null,
126-
validator: str => arrayIncludes(['auto', 'start', 'end', 'center', 'baseline', 'stretch'], str)
117+
validator: str =>
118+
arrayIncludes(['auto', 'start', 'end', 'center', 'baseline', 'stretch'], str)
127119
}
128120
},
129121
render(h, { props, data, children }) {

0 commit comments

Comments
 (0)