fix(esm): fix Feather icons import

This commit is contained in:
Rafael Bardini 2023-02-01 01:47:10 +01:00
parent b80494f473
commit 5b38c4e2fe
1 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
import { icons } from 'feather-icons'
import feather from 'feather-icons'
export default function Icon(name, fallback) {
const ico = icons[name.toLowerCase()] || icons[fallback.toLowerCase()]
return ico.toSvg({ width: 16, height: 16 })
const icon =
feather.icons[name.toLowerCase()] || feather.icons[fallback.toLowerCase()]
return icon.toSvg({ width: 16, height: 16 })
}