Make tooltip easier to reuse across the app

This commit is contained in:
eduardruzga
2024-11-22 11:05:18 +02:00
parent a6060b81a5
commit 60411550a5
5 changed files with 258 additions and 204 deletions

View File

@@ -17,8 +17,8 @@ const menuVariants = {
left: '-150px',
transition: {
duration: 0.2,
ease: cubicEasingFn,
},
ease: cubicEasingFn
}
},
open: {
opacity: 1,
@@ -26,9 +26,9 @@ const menuVariants = {
left: 0,
transition: {
duration: 0.2,
ease: cubicEasingFn,
},
},
ease: cubicEasingFn
}
}
} satisfies Variants;
type DialogContent = { type: 'delete'; item: ChatHistoryItem } | null;
@@ -136,7 +136,8 @@ export function Menu() {
<DialogRoot open={dialogContent !== null}>
{binDates(list).map(({ category, items }) => (
<div key={category} className="mt-4 first:mt-0 space-y-1">
<div className="text-bolt-elements-textTertiary sticky top-0 z-1 bg-bolt-elements-background-depth-2 pl-2 pt-2 pb-1">
<div
className="text-bolt-elements-textTertiary sticky top-0 z-1 bg-bolt-elements-background-depth-2 pl-2 pt-2 pb-1">
{category}
</div>
{items.map((item) => (