Skip to content

Commit

Permalink
fix for #1079
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Jul 21, 2017
1 parent 6a7ed9c commit baf8d35
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/components/grid/index.js
Expand Up @@ -8,10 +8,15 @@ const Grid = (name) => ({
render: (h, { data, children }) => {
data.staticClass = (`${name} ${data.staticClass || ''}`).trim()

if (data.attrs) {
data.staticClass += ` ${Object.keys(data.attrs).join(' ')}`
delete data.attrs
}

Object.keys(data.attrs).forEach(attr => {
const prop = data.attrs[attr]

if (!prop) {
data.staticClass += ` ${prop}`
delete data.attrs[attr]
}
})

return h('div', data, children)
}
Expand Down

1 comment on commit baf8d35

@roblav96
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnleider much ❤️ bro

Please sign in to comment.