json-theme-even-fork/components/icon.js

8 lines
227 B
JavaScript
Raw Normal View History

2023-02-01 01:47:10 +01:00
import feather from 'feather-icons'
export default function Icon(name, fallback) {
2023-02-01 01:47:10 +01:00
const icon =
feather.icons[name.toLowerCase()] || feather.icons[fallback.toLowerCase()]
return icon.toSvg({ width: 16, height: 16 })
}