1
0
Fork 0
mirror of synced 2024-07-03 05:20:32 +12:00
budibase/packages/builder/src/helpers.js

14 lines
268 B
JavaScript
Raw Normal View History

2020-05-29 21:45:19 +12:00
export const buildStyle = styles => {
let str = ""
for (let s in styles) {
if (styles[s]) {
str += `${s}: ${styles[s]}; `
}
}
return str
}
export const convertCamel = str => {
return str.replace(/[A-Z]/g, match => `-${match.toLowerCase()}`)
}