feat: Add image cropping functionality with a new component, dialog, and canvas utilities.

This commit is contained in:
syntaxbullet
2026-02-06 12:45:09 +01:00
parent 34958aa220
commit 1ffe397fbb
7 changed files with 365 additions and 9 deletions

View File

@@ -133,8 +133,7 @@ export function LootTableBuilder({ pool, onChange }: LootTableBuilderProps) {
{/* Drop List */}
<div className="space-y-2">
{pool.map((drop, index) => {
const lootType = LOOT_TYPES.find(t => t.value === drop.type);
const Icon = lootType?.icon || Package;
return (
<Card key={index} className="bg-muted/20 border-border/30">
@@ -149,10 +148,7 @@ export function LootTableBuilder({ pool, onChange }: LootTableBuilderProps) {
onValueChange={(value) => changeDropType(index, value as LootType)}
>
<SelectTrigger className="w-32 bg-background/50">
<div className="flex items-center gap-2">
<Icon className={cn("h-4 w-4", lootType?.color)} />
<SelectValue />
</div>
<SelectValue />
</SelectTrigger>
<SelectContent>
{LOOT_TYPES.map((type) => (