add ButtonClose component

This commit is contained in:
axolotle
2021-06-04 18:07:18 +02:00
parent b9db79988c
commit c1c838635a
3 changed files with 52 additions and 3 deletions
+3 -2
View File
@@ -106,8 +106,9 @@ $card-border-width: 0;
// $card-border-color: $black;
$text-card-header-height: 4rem; // custom
// CUSTOM
$btn-size: 25px;
$text-card-header-height: 4rem;
+48
View File
@@ -0,0 +1,48 @@
<template>
<b-button
v-on="$listeners"
v-bind="$attrs"
variant="link"
class="btn-close"
>
<svg viewBox="0 0 19 19">
<path d="m 2,2 15,15" />
<path d="m 17,2 -15,15" />
</svg>
</b-button>
</template>
<script>
export default {
name: 'ButtonClose'
}
</script>
<style lang="scss" scoped>
.btn-close {
padding: 3px;
width: $btn-size;
height: $btn-size;
border: 0;
line-height: 0;
&:hover,
&:focus {
path {
stroke: $black;
}
}
svg {
width: 100%;
height: 100%;
}
path {
fill: none;
stroke: lighten($black, 30%);
stroke-width: 4px;
stroke-linecap: round;
}
}
</style>
+1 -1
View File
@@ -15,7 +15,7 @@
</template>
<li>
<b-button-close size="sm" @click="onSelfClose($event, text.id)" />
<button-close @click="onSelfClose($event, text.id)" />
</li>
</ul>
</nav>