feat(ui): allow Button to have neutral ("default") color (useful in combination with ghost or outline)

This commit is contained in:
upsiflu 2024-12-17 15:10:02 +01:00
parent 1740fa7c11
commit b5475a1cba
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { ref, computed, useSlots, onMounted } from 'vue'
import { type ColorProps, type VariantProps, propsToColor } from '~/composables/colors';
import { type ColorProps, type VariantProps, type DefaultProps, propsToColor } from '~/composables/colors';
import Loader from '~/components/ui/Loader.vue'
@ -19,7 +19,7 @@ type Props = {
autofocus? : boolean
ariaPressed? : true
} & ColorProps & VariantProps
} & ColorProps & VariantProps & DefaultProps
const props = defineProps<Props>()

View File

@ -64,9 +64,12 @@ watchEffect(()=> {
<Button
@click="openUserMenu = !openUserMenu"
round
default
raised
icon=""
ghost
class="is-icon-only"
:ariaPressed="openUserMenu ? true : undefined"
>
<img
v-if="store.state.auth.authenticated && store.state.auth.profile?.avatar?.urls.medium_square_crop"