perf(ivy): apply static styles/classes directly to an element's style/className properties (#33364)

PR Close #33364
This commit is contained in:
Matias Niemelä
2019-10-23 12:58:20 -07:00
committed by Andrew Kushnir
parent 335854f6bc
commit 5607ad8c62
7 changed files with 85 additions and 24 deletions

View File

@ -296,7 +296,8 @@ export function forceClassesAsString(classes: string | {[key: string]: any} | nu
}
export function forceStylesAsString(
styles: {[key: string]: any} | null | undefined, hyphenateProps: boolean): string {
styles: {[key: string]: any} | string | null | undefined, hyphenateProps: boolean): string {
if (typeof styles == 'string') return styles;
let str = '';
if (styles) {
const props = Object.keys(styles);