Procházet zdrojové kódy

fix(web): fix svg unrecognized props (#631)

Rhon Joe před 1 rokem
rodič
revize
67d326a558
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      web/app/components/base/icons/utils.ts

+ 1 - 0
web/app/components/base/icons/utils.ts

@@ -15,6 +15,7 @@ export type Attrs = {
 export function normalizeAttrs(attrs: Attrs = {}): Attrs {
   return Object.keys(attrs).reduce((acc: Attrs, key) => {
     const val = attrs[key]
+    key = key.replace(/([-]\w)/g, (g: string) => g[1].toUpperCase())
     switch (key) {
       case 'class':
         acc.className = val