parent
710a904323
commit
5a63f00f51
@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<button
|
||||
:class="[
|
||||
'inline-flex justify-center rounded-md border border-transparent py-2 px-4 text-sm font-medium shadow-sm',
|
||||
'focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2',
|
||||
classes,
|
||||
]"
|
||||
:type="buttonType"
|
||||
>
|
||||
<slot />
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
buttonType?: 'submit' | 'button';
|
||||
variant?: 'primary' | 'secondary' | 'tertiary';
|
||||
}>(),
|
||||
{ buttonType: 'button', variant: 'primary' }
|
||||
);
|
||||
|
||||
const classes = computed(() => {
|
||||
if (!props.variant || props.variant === 'primary')
|
||||
return 'bg-green-600 hover:bg-green-700 text-white';
|
||||
});
|
||||
</script>
|
@ -0,0 +1,11 @@
|
||||
import { Component } from 'vue';
|
||||
import { RouteLocationRaw } from 'vue-router';
|
||||
|
||||
export interface MenuOption {
|
||||
title: string;
|
||||
key?: string;
|
||||
link?: RouteLocationRaw;
|
||||
icon?: Component;
|
||||
onClick?: () => void;
|
||||
component?: Component;
|
||||
}
|
Loading…
Reference in new issue