diff --git a/docs/pages/examples.vue b/docs/pages/examples.vue index 631d75d4..ec8f68d0 100644 --- a/docs/pages/examples.vue +++ b/docs/pages/examples.vue @@ -154,8 +154,8 @@ Tooltip: - - + + diff --git a/src/runtime/components/overlays/Tooltip.vue b/src/runtime/components/overlays/Tooltip.vue index fe1243b0..79142a4e 100644 --- a/src/runtime/components/overlays/Tooltip.vue +++ b/src/runtime/components/overlays/Tooltip.vue @@ -6,10 +6,17 @@
-
+
- {{ text }} + {{ text }} + + + · + + {{ shortcut }} + +
@@ -29,6 +36,10 @@ const props = defineProps({ type: String, default: null }, + shortcuts: { + type: Array as PropType, + default: () => [] + }, wrapperClass: { type: String, default: () => $ui.tooltip.wrapper @@ -41,6 +52,22 @@ const props = defineProps({ type: String, default: () => $ui.tooltip.width }, + backgroundClass: { + type: String, + default: () => $ui.tooltip.background + }, + shadowClass: { + type: String, + default: () => $ui.tooltip.shadow + }, + ringClass: { + type: String, + default: () => $ui.tooltip.ring + }, + roundedClass: { + type: String, + default: () => $ui.tooltip.rounded + }, baseClass: { type: String, default: () => $ui.tooltip.base diff --git a/src/runtime/presets/default.ts b/src/runtime/presets/default.ts index b2a500a8..383955f0 100644 --- a/src/runtime/presets/default.ts +++ b/src/runtime/presets/default.ts @@ -487,7 +487,11 @@ export default (variantColors: string[]) => { wrapper: 'relative inline-flex', container: 'z-20', width: 'max-w-xs', - base: 'invisible w-auto h-6 px-2 py-1 space-x-1 truncate rounded shadow lg:visible u-bg-gray-800 truncate u-text-gray-50 text-xs', + background: 'u-bg-white', + shadow: 'shadow', + rounded: 'rounded', + ring: 'ring-1 u-ring-gray-200', + base: 'invisible lg:visible h-6 px-2 py-1 text-xs', transition: { enterActiveClass: 'transition ease-out duration-200', enterFromClass: 'opacity-0 translate-y-1',