From 1dad7e86a0c4653029b57c7e8bc4b81bcbf4ca10 Mon Sep 17 00:00:00 2001 From: miloschwartz Date: Thu, 4 Sep 2025 18:02:29 -0700 Subject: [PATCH] add optional icon to strategy select --- src/components/StrategySelect.tsx | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/components/StrategySelect.tsx b/src/components/StrategySelect.tsx index b431b96c..374d1bae 100644 --- a/src/components/StrategySelect.tsx +++ b/src/components/StrategySelect.tsx @@ -2,13 +2,14 @@ import { cn } from "@app/lib/cn"; import { RadioGroup, RadioGroupItem } from "./ui/radio-group"; -import { useState } from "react"; +import { useState, ReactNode } from "react"; export interface StrategyOption { - id: TValue; +id: TValue; title: string; description: string; disabled?: boolean; + icon?: ReactNode; } interface StrategySelectProps { @@ -58,10 +59,17 @@ export function StrategySelect({ disabled={option.disabled} className="absolute left-4 top-5 h-4 w-4 border-primary text-primary" /> -
-
{option.title}
-
- {option.description} +
+ {option.icon && ( +
+ {option.icon} +
+ )} +
+
{option.title}
+
+ {option.description} +