mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
@mattwr18 great work and great styling so far! ;) fyi: I noticed there was a lot of duplicate CSS and the solution I came up with is this new component, using slots
40 lines
670 B
Vue
40 lines
670 B
Vue
<template>
|
|
<div class="labeled-button">
|
|
<base-button circle :icon="icon" :filled="filled" @click="event => $emit('click', event)" />
|
|
<label class="label">{{ label }}</label>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
filled: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
icon: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
label: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.labeled-button {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
|
|
> .label {
|
|
margin-top: $space-x-small;
|
|
font-size: $font-size-small;
|
|
text-align: center;
|
|
}
|
|
}
|
|
</style>
|