Simplify lightbox
This commit is contained in:
@@ -23,7 +23,7 @@ export default {
|
||||
'spot-icon',
|
||||
this.icon,
|
||||
...(this.classes || '').split(/\s+/),
|
||||
this.margin?'margin-'+this.margin:null || this.hasText?'margin-right':null
|
||||
this.margin?'margin-'+this.margin:null
|
||||
].filter(Boolean).join(' ');
|
||||
},
|
||||
resolvedFixedWidth() {
|
||||
@@ -49,7 +49,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span :title="title" v-if="title || hasText">
|
||||
<span :title="title" v-if="title || hasText" class="spot-icon-box">
|
||||
<FontAwesomeIcon :icon="iconDefinition" :class="classNames" :fixed-width="resolvedFixedWidth" :width-auto="resolvedAutoWidth" :size="resolvedSize" :transform="resolvedTransform" />
|
||||
<span v-if="hasText" :class="textClasses">{{ text }}</span>
|
||||
</span>
|
||||
@@ -59,6 +59,16 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
@use "@styles/var";
|
||||
|
||||
.spot-icon-box {
|
||||
display: flex;
|
||||
gap: var.$elem-spacing;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.spot-icon {
|
||||
&.margin-right {
|
||||
margin-right: var.$elem-spacing;
|
||||
|
||||
Reference in New Issue
Block a user