docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Create a small React helper and banner component that read custom properties provided by a host shell at runtime. The goal is to prove you can consume host-provided context data from the dependency and surface it inside your child application UI.
displayName, organization, and theme, merging any caller-provided defaults when the host omits fields. @testdisplayName and organization, falling back to caller-specified defaults (or "Guest" / "Unknown") when missing. @testexport interface HostCustomProps {
displayName?: string;
organization?: string;
theme?: "light" | "dark";
}
export function useHostCustomProps(
defaults?: Partial<HostCustomProps>
): HostCustomProps;
export interface HostBannerProps {
fallbackName?: string;
fallbackOrg?: string;
}
export function HostBanner(props?: HostBannerProps): JSX.Element;Provides runtime context for host-supplied custom properties that should flow into the child React tree.