Terrace/docs/renderer/util/feather-icons.js
2023-03-04 22:36:08 -05:00

20 lines
504 B
JavaScript

import feather from 'feather-icons'
const defaultAttributes = {
"class": "feather feather-x",
"xmlns": "http://www.w3.org/2000/svg",
"width": 24,
"height": 24,
"viewBox": "0 0 24 24",
"fill": "none",
"stroke": "currentColor",
"stroke-width": 2,
"stroke-linecap": "round",
"stroke-linejoin": "round",
}
export default (iconName, attributes = {}) => {
attributes = { ...defaultAttributes, ...attributes }
return feather.icons[iconName].toSvg(attributes)
}