diff --git a/src/components/Icon.vue b/src/components/Icon.vue index 1fddff6..54cb122 100644 --- a/src/components/Icon.vue +++ b/src/components/Icon.vue @@ -5,7 +5,7 @@ 'ct-icon': true, [`ct-icon--size-${size}`]: size }" - :is="svg" + :is="svgData" role="img" /> @@ -17,6 +17,10 @@ export default { Type: String, default: undefined }, + svg: { + type: Object, + default: undefined + }, symbol: { type: String, default: 'account' @@ -28,7 +32,9 @@ export default { }, computed: { - svg: ({ symbol }) => () => import(`civictheme/assets/icons/${symbol}.svg?inline`) + svgData: ({ svg, symbol }) => () => svg + ? svg + : import(`civictheme/assets/icons/${symbol}.svg?inline`) }, }