mirror of
https://github.com/enso-org/enso.git
synced 2024-11-25 21:25:20 +03:00
Improve tooltip visuals according to new design (#10074)
#### Tl;dr Closes: enso-org/cloud-v2#1257 --- ![CleanShot 2024-05-24 at 16 23 09](https://github.com/enso-org/enso/assets/61194245/90c25ad8-8079-4cde-a4aa-55d03c6a9389)
This commit is contained in:
parent
d8059fd22c
commit
384f7ec5c8
@ -9,8 +9,33 @@ import * as portal from '#/components/Portal'
|
||||
// =================
|
||||
|
||||
export const TOOLTIP_STYLES = twv.tv({
|
||||
base: 'group flex bg-frame justify-center outline outline-1 outline-primary/15 items-center backdrop-blur-default text-primary px-2 py-1.5 leading-cozy text-center text-balance min-h-6 rounded-lg shadow-lg text-xs max-w-xs',
|
||||
base: 'group flex justify-center items-center text-center text-balance',
|
||||
variants: {
|
||||
variant: {
|
||||
custom: '',
|
||||
primary: 'bg-primary/80 text-white/80',
|
||||
inverted: 'bg-white/80 text-primary/80',
|
||||
},
|
||||
size: {
|
||||
custom: '',
|
||||
medium: 'text-xs leading-[25px] px-2 py-1',
|
||||
},
|
||||
rounded: {
|
||||
custom: '',
|
||||
full: 'rounded-full',
|
||||
large: 'rounded-lg',
|
||||
medium: 'rounded-md',
|
||||
small: 'rounded-sm',
|
||||
none: 'rounded-none',
|
||||
},
|
||||
maxWidth: {
|
||||
custom: '',
|
||||
xsmall: 'max-w-xs',
|
||||
small: 'max-w-sm',
|
||||
medium: 'max-w-md',
|
||||
large: 'max-w-lg',
|
||||
xlarge: 'max-w-xl',
|
||||
},
|
||||
isEntering: {
|
||||
true: 'animate-in fade-in placement-bottom:slide-in-from-top-0.5 placement-top:slide-in-from-bottom-0.5 placement-left:slide-in-from-right-0.5 placement-right:slide-in-from-left-0.5 ease-out duration-150',
|
||||
},
|
||||
@ -18,6 +43,12 @@ export const TOOLTIP_STYLES = twv.tv({
|
||||
true: 'animate-out fade-out placement-bottom:slide-out-to-top-0.5 placement-top:slide-out-to-bottom-0.5 placement-left:slide-out-to-right-0.5 placement-right:slide-out-to-left-0.5 ease-in duration-150',
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: 'primary',
|
||||
size: 'medium',
|
||||
maxWidth: 'xsmall',
|
||||
rounded: 'full',
|
||||
},
|
||||
})
|
||||
|
||||
const DEFAULT_CONTAINER_PADDING = 6
|
||||
|
Loading…
Reference in New Issue
Block a user