refactor: add new button
This commit is contained in:
parent
9883eebd67
commit
19b66370f0
2 changed files with 28 additions and 0 deletions
|
|
@ -8,3 +8,4 @@ export { default as UndoButton } from './UndoButton.vue';
|
|||
export { default as ToggleButton } from './ToggleButton.vue';
|
||||
export { default as ClearButton } from './ClearButton.vue';
|
||||
export { default as CloseButton } from './CloseButton.vue';
|
||||
export { default as ViewButton } from './viewButton.vue';
|
||||
|
|
|
|||
27
src/components/button/viewButton.vue
Normal file
27
src/components/button/viewButton.vue
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<script lang="ts" setup>
|
||||
import MainButton from './MainButton.vue';
|
||||
|
||||
defineEmits<{
|
||||
(e: 'click', v: MouseEvent): void;
|
||||
}>();
|
||||
defineProps<{
|
||||
iconOnly?: boolean;
|
||||
solid?: boolean;
|
||||
outlined?: boolean;
|
||||
disabled?: boolean;
|
||||
dark?: boolean;
|
||||
size?: string;
|
||||
}>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<MainButton
|
||||
@click="(e) => $emit('click', e)"
|
||||
v-bind="{ ...$props, ...$attrs }"
|
||||
icon="mdi-eye-outline"
|
||||
color="var(--gray-8-hsl)"
|
||||
:title="iconOnly ? $t('general.viewDetail') : undefined"
|
||||
>
|
||||
{{ $t('general.viewDetail') }}
|
||||
</MainButton>
|
||||
</template>
|
||||
Loading…
Add table
Add a link
Reference in a new issue