feat(ui): allow Button to have neutral ("default") color (useful in combination with ghost or outline)
This commit is contained in:
parent
1740fa7c11
commit
b5475a1cba
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, useSlots, onMounted } from 'vue'
|
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'
|
import Loader from '~/components/ui/Loader.vue'
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ type Props = {
|
||||||
|
|
||||||
autofocus? : boolean
|
autofocus? : boolean
|
||||||
ariaPressed? : true
|
ariaPressed? : true
|
||||||
} & ColorProps & VariantProps
|
} & ColorProps & VariantProps & DefaultProps
|
||||||
|
|
||||||
const props = defineProps<Props>()
|
const props = defineProps<Props>()
|
||||||
|
|
||||||
|
|
|
@ -64,9 +64,12 @@ watchEffect(()=> {
|
||||||
<Button
|
<Button
|
||||||
@click="openUserMenu = !openUserMenu"
|
@click="openUserMenu = !openUserMenu"
|
||||||
round
|
round
|
||||||
|
default
|
||||||
|
raised
|
||||||
icon=""
|
icon=""
|
||||||
ghost
|
ghost
|
||||||
class="is-icon-only"
|
class="is-icon-only"
|
||||||
|
:ariaPressed="openUserMenu ? true : undefined"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
v-if="store.state.auth.authenticated && store.state.auth.profile?.avatar?.urls.medium_square_crop"
|
v-if="store.state.auth.authenticated && store.state.auth.profile?.avatar?.urls.medium_square_crop"
|
||||||
|
|
Loading…
Reference in New Issue