refactor: Small refactoring Tooltip component
This commit is contained in:
@@ -3,9 +3,11 @@
|
||||
<!-- Show tooltip on hover -->
|
||||
<Tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<button type="button"
|
||||
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
|
||||
Tooltip hover
|
||||
<button
|
||||
type="button"
|
||||
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
||||
>
|
||||
Tooltip hover
|
||||
</button>
|
||||
</template>
|
||||
<template #content>
|
||||
@@ -15,9 +17,11 @@
|
||||
<!-- Show tooltip on click -->
|
||||
<Tooltip trigger="click">
|
||||
<template #trigger>
|
||||
<button type="button"
|
||||
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
|
||||
Tooltip click
|
||||
<button
|
||||
type="button"
|
||||
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
||||
>
|
||||
Tooltip click
|
||||
</button>
|
||||
</template>
|
||||
<template #content>
|
||||
@@ -35,11 +39,11 @@ import type { TooltipPlacement } from '../../../../src/components/Tooltip/types'
|
||||
const props = defineProps({
|
||||
placement: {
|
||||
type: String as PropType<TooltipPlacement>,
|
||||
default: 'top'
|
||||
default: 'top',
|
||||
},
|
||||
arrowColor: {
|
||||
type: String,
|
||||
default: "#0f172a",
|
||||
}
|
||||
default: '#0f172a',
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user