소스 검색

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

Rhon Joe 1 년 전
부모
커밋
67d326a558
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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