From 00d6f15e7c38da5d781010aea3ae51f820ab5a22 Mon Sep 17 00:00:00 2001 From: Jake Howell Date: Fri, 20 Feb 2026 12:54:25 +1100 Subject: [PATCH] chore: deprecate `` (#22107) Based on previous PR reviews it appears we don't want to use these components anymore. We previously deprecated the use of `` in this way in #20973 so it would be good to take the same approach here. --- site/src/components/Conditionals/ChooseOne.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/src/components/Conditionals/ChooseOne.tsx b/site/src/components/Conditionals/ChooseOne.tsx index 2cad54fd6a..8897fd4bc4 100644 --- a/site/src/components/Conditionals/ChooseOne.tsx +++ b/site/src/components/Conditionals/ChooseOne.tsx @@ -17,6 +17,7 @@ interface CondProps { * should not have a condition. * @param condition boolean expression indicating whether the child should be rendered, or undefined * @returns child. Note that Cond alone does not enforce the condition; it should be used inside ChooseOne. + * @deprecated Use standard conditional rendering (ternary operators or && expressions) instead. */ export const Cond: FC = ({ children }) => { return <>{children}; @@ -28,6 +29,7 @@ export const Cond: FC = ({ children }) => { * will be rendered. * @returns one of its children, or null if there are no children * @throws an error if its last child has a condition prop, or any non-final children do not have a condition prop + * @deprecated Use standard conditional rendering (ternary operators or && expressions) instead. */ export const ChooseOne: FC = ({ children }) => { const childArray = Children.toArray(children) as JSX.Element[];