(style: CssStyle)
| 33 | * (hyphenating camelCase property names). Returns "" when no property is set. |
| 34 | */ |
| 35 | const cssStyleToString = function(style: CssStyle): string { |
| 36 | let styles = ""; |
| 37 | for (const key of Object.keys(style) as Array<keyof CssStyle>) { |
| 38 | const value = style[key]; |
| 39 | if (value !== undefined) { |
| 40 | styles += `${hyphenate(key)}:${value};`; |
| 41 | } |
| 42 | } |
| 43 | return styles; |
| 44 | }; |
| 45 | |
| 46 | type InitNodeData = { |
| 47 | classes: string[]; |