docs: update styling

This commit is contained in:
Philipp Kühn
2021-04-20 10:13:43 +02:00
parent b6852ad9ca
commit ecf0c92434
14 changed files with 51 additions and 57 deletions

View File

@@ -1,3 +1,11 @@
<template>
<div :class="`icon icon--${size}`">
<svg>
<use :xlink:href="`${require('remixicon/fonts/remixicon.symbol.svg')}#ri-${name}`" />
</svg>
</div>
</template>
<script>
export default {
name: 'Icon',
@@ -13,25 +21,6 @@ export default {
default: 'normal',
},
},
render(createElement) {
let svgHTML = ''
try {
svgHTML = require(`!html-loader!@/assets/icons/${this.name}.svg`)
} catch (e) {
// eslint-disable-next-line
console.warn(`Unable to load "${this.name}.svg" icon. Verify it exists in the icons directory.`, e)
}
return createElement(
'div',
{
class: `icon icon--${this.size}`,
domProps: {
innerHTML: svgHTML,
},
},
)
},
}
</script>

View File

@@ -1,7 +1,16 @@
.icon {
display: inline-flex;
width: 1rem;
height: 1rem;
width: 1.25rem;
height: 1.25rem;
margin: 0 0.4rem;
&:first-child {
margin-left: 0;
}
&:last-child {
margin-right: 0;
}
&::v-deep > svg {
width: 100%;