Skip to content

Commit

Permalink
Add overflow and max height
Browse files Browse the repository at this point in the history
  • Loading branch information
evmiguel committed Apr 9, 2024
1 parent 3d6930c commit 8aa4d3a
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions components/Analysis/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export default function Analysis({ purchases }: AnalysisProps) {
<DialogTrigger asChild>
<Button className="Analyze">Analyze</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-[1000px]">
<DialogContent className="sm:max-w-[1000px] overflow-y-scroll">
<DialogHeader>
<DialogTitle>This is what you&apos;ve accumulated {context.purchaseFilter === 'all' ? 'for all time' : `this ${context.purchaseFilter}`}</DialogTitle>
</DialogHeader>
Expand All @@ -151,15 +151,17 @@ export default function Analysis({ purchases }: AnalysisProps) {
<TabsTrigger value="items">Items</TabsTrigger>
<TabsTrigger value="categories">Categories</TabsTrigger>
</TabsList>
<TabsContent value="items">
<ul>
{itemsBought.map(purchase => (
<li className="flex justify-between" key={purchase.name}><span className="inline-block">{purchase.name}</span> <span className="inline-block">{new Intl.NumberFormat("en-US", {
style: "currency",
currency: "USD",
}).format(purchase.cost)}</span></li>
))}
</ul>
<TabsContent value="items" className="overflow-scroll max-h-96">
<div>
<ul>
{itemsBought.map(purchase => (
<li className="flex justify-between" key={purchase.name}><span className="inline-block">{purchase.name}</span> <span className="inline-block">{new Intl.NumberFormat("en-US", {
style: "currency",
currency: "USD",
}).format(purchase.cost)}</span></li>
))}
</ul>
</div>
</TabsContent>
<TabsContent value="categories">
<div className="text-center">
Expand Down

0 comments on commit 8aa4d3a

Please sign in to comment.