fix(web): fix svg unrecognized props (#631)
This commit is contained in:
parent
fe747040bc
commit
67d326a558
1 changed files with 1 additions and 0 deletions
|
|
@ -15,6 +15,7 @@ export type Attrs = {
|
||||||
export function normalizeAttrs(attrs: Attrs = {}): Attrs {
|
export function normalizeAttrs(attrs: Attrs = {}): Attrs {
|
||||||
return Object.keys(attrs).reduce((acc: Attrs, key) => {
|
return Object.keys(attrs).reduce((acc: Attrs, key) => {
|
||||||
const val = attrs[key]
|
const val = attrs[key]
|
||||||
|
key = key.replace(/([-]\w)/g, (g: string) => g[1].toUpperCase())
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'class':
|
case 'class':
|
||||||
acc.className = val
|
acc.className = val
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue