From 2b54dfe035e46a55f0049efa6667b5f7d1dbb501 Mon Sep 17 00:00:00 2001
From: miloschwartz
+ Operating System +
++ {platform === "docker" + ? "Method" + : "Architecture"} +
++ Commands +
+ {
};
return (
-
+
{isLink ? (
{text}
) : (
- {text}
+
+ {text}
+
)}
+ return {children}
}
export function SettingsSectionHeader({ children }: { children: React.ReactNode }) {
- return {children}
+ return {children}
}
export function SettingsSectionForm({ children }: { children: React.ReactNode }) {
diff --git a/src/components/SettingsSectionTitle.tsx b/src/components/SettingsSectionTitle.tsx
index ddd8b6fa..e7d9b7e9 100644
--- a/src/components/SettingsSectionTitle.tsx
+++ b/src/components/SettingsSectionTitle.tsx
@@ -1,13 +1,13 @@
type SettingsSectionTitleProps = {
title: string | React.ReactNode;
- description: string | React.ReactNode;
+ description?: string | React.ReactNode;
size?: "2xl" | "1xl";
};
export default function SettingsSectionTitle({
title,
description,
- size,
+ size
}: SettingsSectionTitleProps) {
return (
{title}
- {description}
+ {description && (
+ {description}
+ )}
);
}
diff --git a/src/components/StrategySelect.tsx b/src/components/StrategySelect.tsx
index 48c1fcb0..f36f13c9 100644
--- a/src/components/StrategySelect.tsx
+++ b/src/components/StrategySelect.tsx
@@ -2,42 +2,59 @@
import { cn } from "@app/lib/cn";
import { RadioGroup, RadioGroupItem } from "./ui/radio-group";
+import { useState } from "react";
interface StrategyOption {
id: string;
title: string;
description: string;
+ disabled?: boolean; // New optional property
}
interface StrategySelectProps {
options: StrategyOption[];
defaultValue?: string;
onChange?: (value: string) => void;
+ cols?: number;
}
export function StrategySelect({
options,
defaultValue,
- onChange
+ onChange,
+ cols
}: StrategySelectProps) {
+ const [selected, setSelected] = useState(defaultValue);
+
return (
{
+ setSelected(value);
+ onChange?.(value);
+ }}
+ className={`grid md:grid-cols-${cols ? cols : 1} gap-4`}
>
{options.map((option) => (