mirror of https://github.com/wg-easy/wg-easy
29 changed files with 118 additions and 60 deletions
@ -0,0 +1,26 @@ |
|||
<template> |
|||
<component |
|||
:is="elementType" |
|||
role="button" |
|||
class="inline-flex items-center rounded border-2 border-red-800 bg-red-800 px-4 py-2 text-white transition hover:border-red-600 hover:bg-red-600" |
|||
v-bind="attrs" |
|||
> |
|||
<slot /> |
|||
</component> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
const props = defineProps({ |
|||
as: { |
|||
type: String, |
|||
default: 'button', |
|||
}, |
|||
}); |
|||
|
|||
const elementType = computed(() => props.as); |
|||
|
|||
const attrs = computed(() => { |
|||
const { as, ...attrs } = props; |
|||
return attrs; |
|||
}); |
|||
</script> |
@ -1,8 +1,8 @@ |
|||
<template> |
|||
<ClientsCreateDialog> |
|||
<BaseButton as="span"> |
|||
<BaseSecondaryButton as="span"> |
|||
<IconsPlus class="w-4 md:mr-2" /> |
|||
<span class="text-sm max-md:hidden">{{ $t('client.newShort') }}</span> |
|||
</BaseButton> |
|||
</BaseSecondaryButton> |
|||
</ClientsCreateDialog> |
|||
</template> |
|||
|
@ -0,0 +1,16 @@ |
|||
<template> |
|||
<input |
|||
:value="label" |
|||
:type="type ?? 'button'" |
|||
class="col-span-2 rounded-lg border-2 border-red-800 bg-red-800 py-2 text-white hover:border-red-600 hover:bg-red-600 focus:border-red-800 focus:outline-0 focus:ring-0" |
|||
/> |
|||
</template> |
|||
|
|||
<script lang="ts" setup> |
|||
import type { InputTypeHTMLAttribute } from 'vue'; |
|||
|
|||
defineProps<{ |
|||
label: string; |
|||
type?: InputTypeHTMLAttribute; |
|||
}>(); |
|||
</script> |
Loading…
Reference in new issue