diff --git a/components/ChatInputBox/AspectRatioSelector.tsx b/components/ChatInputBox/AspectRatioSelector.tsx index 97ed5f5..95d4804 100644 --- a/components/ChatInputBox/AspectRatioSelector.tsx +++ b/components/ChatInputBox/AspectRatioSelector.tsx @@ -1,8 +1,6 @@ "use client"; -import { Dropdown } from "antd"; import { RectangleHorizontal, RectangleVertical } from "lucide-react"; -import { AspectRatioOptions } from "./types"; export type AspectRatioValue = | "VIDEO_ASPECT_RATIO_LANDSCAPE" @@ -22,13 +20,13 @@ interface AspectRatioSelectorProps { } /** - * A reusable aspect ratio selector (landscape/portrait) using Antd Dropdown. - * Shows an icon and label, and calls onChange when a new ratio is chosen. + * Aspect ratio selector using Antd Radio.Group with two options: landscape and portrait. + * Uses icons as button content and triggers onChange when selection changes. * @param {AspectRatioValue} value - current selected value * @param {(v: AspectRatioValue) => void} onChange - change handler - * @param {string} [className] - optional className for trigger button - * @param {string} [placement] - Dropdown placement, default is top - * @param {string} [dataAlt] - data-alt attribute for the trigger + * @param {string} [className] - optional className for wrapper + * @param {string} [placement] - kept for backward compatibility (unused) + * @param {string} [dataAlt] - data-alt attribute for the wrapper * @returns {JSX.Element} */ export const AspectRatioSelector = ({ @@ -39,45 +37,47 @@ export const AspectRatioSelector = ({ dataAlt = "config-aspect-ratio", }: AspectRatioSelectorProps) => { return ( - ({ - key: option.value, - label: ( -
- {option.value === "VIDEO_ASPECT_RATIO_LANDSCAPE" ? ( - - ) : ( - - )} - {option.label} -
- ), - })), - onClick: ({ key }) => onChange(key as AspectRatioValue), - }} - trigger={["click"]} - placement={placement} +
- + +
); }; diff --git a/components/ChatInputBox/ChatInputBox.tsx b/components/ChatInputBox/ChatInputBox.tsx index 04e219e..dd530cd 100644 --- a/components/ChatInputBox/ChatInputBox.tsx +++ b/components/ChatInputBox/ChatInputBox.tsx @@ -523,11 +523,12 @@ export function ChatInputBox({ noData }: { noData: boolean }) { placement="top" >