Skip to content

Commit a3b7ebe

Browse files
committed
feat(kcd2alchemy): improved base value display on potion card.
1 parent f3938a2 commit a3b7ebe

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

src/features/tools/kcd2_alchemy/components/PotionCard.tsx

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { IngredientId, NormalizedPotionRecipe } from '../types'
22
import { useEffect, useMemo, useState } from 'react'
3-
import { Droplet, Sprout, BookOpenText, Bolt, Hash, Info } from 'lucide-react'
3+
import { Droplet, Sprout, BookOpenText, Bolt, Hash, Info, Coins } from 'lucide-react'
44
import { QuantityTable } from './QuantityTable'
55

66
export function PotionCard({ potion, highlightIngredientIds = [], playerAlchemyLevel = 0 }: { potion: NormalizedPotionRecipe; highlightIngredientIds?: IngredientId[]; playerAlchemyLevel?: number }) {
@@ -49,22 +49,19 @@ export function PotionCard({ potion, highlightIngredientIds = [], playerAlchemyL
4949

5050
return (
5151
<article id={`potion-${potion.id}`} className="border border-[var(--border-light)] rounded-xl p-0 bg-[var(--card)] shadow-sm hover:shadow-md transition-shadow duration-200">
52-
<header className="relative p-6 pb-4 bg-gradient-to-br from-[var(--surface)] to-[var(--surface-2)] rounded-t-xl border-b border-[var(--border-light)]">
53-
{/* Base value badge in upper-right */}
54-
<div className="absolute top-4 right-4">
55-
<span
56-
className="px-2 py-1 rounded-md bg-[var(--surface)] text-[var(--text-primary)] text-xs font-semibold border border-[var(--border)]"
57-
aria-label={`Base value: ${priceText} groschen`}
58-
title={`Base value: ${priceText} groschen`}
59-
>
60-
{priceText}g
61-
</span>
62-
</div>
52+
<header className="p-6 pb-4 bg-gradient-to-br from-[var(--surface)] to-[var(--surface-2)] rounded-t-xl border-b border-[var(--border-light)]">
6353
<h3 className="text-2xl font-bold text-[var(--text-primary)] mb-2">{potion.name}</h3>
64-
<div className="flex items-center gap-2 text-sm text-[var(--text-tertiary)]">
65-
<Droplet className="w-4 h-4" />
66-
<span className="font-medium">Base liquid:</span>
67-
<span className="px-2 py-1 rounded-md bg-[var(--surface-2)] text-[var(--text-primary)] text-xs font-semibold border border-[var(--border)]">{potion.ingredients.liquid}</span>
54+
<div className="flex items-center justify-between gap-4">
55+
<div className="flex items-center gap-2 text-sm text-[var(--text-tertiary)]">
56+
<Droplet className="w-4 h-4" />
57+
<span className="font-medium">Base liquid:</span>
58+
<span className="px-2 py-1 rounded-md bg-[var(--surface-2)] text-[var(--text-primary)] text-xs font-semibold border border-[var(--border)]">{potion.ingredients.liquid}</span>
59+
</div>
60+
<div className="flex items-center gap-2 text-sm text-[var(--text-tertiary)]">
61+
<Coins className="w-4 h-4" />
62+
<span className="font-medium">Base value:</span>
63+
<span className="px-2 py-1 rounded-md bg-[var(--surface-2)] text-[var(--text-primary)] text-xs font-semibold border border-[var(--border)]">{priceText}g</span>
64+
</div>
6865
</div>
6966
</header>
7067

0 commit comments

Comments
 (0)