From 3a29b04d10f800d4f4f41251732e91343508c201 Mon Sep 17 00:00:00 2001 From: Simon Farshid Date: Thu, 10 Oct 2024 11:44:45 -0700 Subject: [PATCH] feat: ContentPartPrimitive.InProgress should display in requires-action state (#965) --- .../src/primitives/contentPart/ContentPartInProgress.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react/src/primitives/contentPart/ContentPartInProgress.tsx b/packages/react/src/primitives/contentPart/ContentPartInProgress.tsx index 63f5c53103..a52a3f235d 100644 --- a/packages/react/src/primitives/contentPart/ContentPartInProgress.tsx +++ b/packages/react/src/primitives/contentPart/ContentPartInProgress.tsx @@ -3,11 +3,12 @@ import { useContentPart } from "../../context"; export type ContentPartPrimitiveInProgressProps = PropsWithChildren; -// TODO should this be renamed to IsRunning? export const ContentPartPrimitiveInProgress: FC< ContentPartPrimitiveInProgressProps > = ({ children }) => { - const isInProgress = useContentPart((c) => c.status.type === "running"); + const isInProgress = useContentPart( + (c) => c.status.type === "running" || c.status.type === "requires-action", + ); return isInProgress ? children : null; };