feat: add RowSubmitAction component with size prop for enhanced button customization
This commit is contained in:
parent
950c3e2deb
commit
e32a0138dd
@ -6,22 +6,22 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip
|
|||||||
defineProps<{
|
defineProps<{
|
||||||
tooltip?: string;
|
tooltip?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
size?: 'default' | 'sm';
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
defineEmits<{
|
defineEmits(['click']);
|
||||||
click: [];
|
|
||||||
}>();
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger as-child>
|
<TooltipTrigger as-child>
|
||||||
<Button variant="ghost" size="icon" class="size-8 text-blue-600 hover:text-blue-700" :disabled="disabled"
|
<Button variant="ghost" :size="size === 'sm' ? 'sm' : 'icon'"
|
||||||
|
:class="size === 'sm' ? '' : 'size-8'" class="text-blue-600 hover:text-blue-700" :disabled="disabled"
|
||||||
@click="$emit('click')">
|
@click="$emit('click')">
|
||||||
<Send class="size-4" />
|
<Send :class="size === 'sm' ? 'size-3.5' : 'size-4'" />
|
||||||
<span class="sr-only">{{ tooltip || 'Ajukan Verifikasi' }}</span>
|
<span class="sr-only">{{ tooltip || 'Submit' }}</span>
|
||||||
</Button>
|
</Button>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>{{ tooltip || 'Ajukan Verifikasi' }}</TooltipContent>
|
<TooltipContent>{{ tooltip || 'Submit' }}</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -2,6 +2,7 @@ export { default as RowEditAction } from './RowEditAction.vue';
|
|||||||
export { default as RowDeleteAction } from './RowDeleteAction.vue';
|
export { default as RowDeleteAction } from './RowDeleteAction.vue';
|
||||||
export { default as RowApproveAction } from './RowApproveAction.vue';
|
export { default as RowApproveAction } from './RowApproveAction.vue';
|
||||||
export { default as RowRejectAction } from './RowRejectAction.vue';
|
export { default as RowRejectAction } from './RowRejectAction.vue';
|
||||||
|
export { default as RowSubmitAction } from './RowSubmitAction.vue';
|
||||||
export { default as RowPayAction } from './RowPayAction.vue';
|
export { default as RowPayAction } from './RowPayAction.vue';
|
||||||
export { default as RowAdjustAction } from './RowAdjustAction.vue';
|
export { default as RowAdjustAction } from './RowAdjustAction.vue';
|
||||||
export { default as RowStatusAction } from './RowStatusAction.vue';
|
export { default as RowStatusAction } from './RowStatusAction.vue';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user