From 7ec809b222f60d13785e3d7da508a4c9ee3f2e17 Mon Sep 17 00:00:00 2001 From: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com> Date: Mon, 2 Sep 2024 15:52:49 +0200 Subject: [PATCH] refactor: deprecate ConditionallyRender (#8047) yeet :tada: --- .../common/ConditionallyRender/ConditionallyRender.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/component/common/ConditionallyRender/ConditionallyRender.tsx b/frontend/src/component/common/ConditionallyRender/ConditionallyRender.tsx index dea335707d..12a97754ce 100644 --- a/frontend/src/component/common/ConditionallyRender/ConditionallyRender.tsx +++ b/frontend/src/component/common/ConditionallyRender/ConditionallyRender.tsx @@ -15,6 +15,10 @@ type TargetElement = type RenderFunc = () => JSX.Element; +/** + * @deprecated Use a ternary operator (`condition ? show : elseShow`) + * @see https://docs.getunleash.io/contributing/ADRs/front-end/jsx-conditionals + */ export const ConditionallyRender = ({ condition, show,