mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
style base icon
This commit is contained in:
parent
9a7222fad7
commit
48398075c8
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<span v-if="svgIcon">
|
||||
<component :is="svgIcon" />
|
||||
<span v-if="svgIcon" class="base-icon">
|
||||
<component :is="svgIcon" aria-hidden="true" focusable="false" class="svg" />
|
||||
</span>
|
||||
</template>
|
||||
|
||||
@ -26,10 +26,21 @@ export default {
|
||||
/*
|
||||
a Vue component needs a render function,
|
||||
so we check if there is a render function directly on the icon –
|
||||
otherwise it is wrapped in icon.default
|
||||
otherwise we know it is wrapped in icon.default
|
||||
*/
|
||||
return icon.render ? icon : icon.default
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.base-icon {
|
||||
display: inline-flex;
|
||||
|
||||
> .svg {
|
||||
height: 1em;
|
||||
fill: currentColor;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user