({
context,
value,
children
}: {
context: React.Context<any>;
value: any;
children: any;
})
| 390 | } |
| 391 | // A Context.Provider that only sets a value if not inside SelectValue. |
| 392 | function DefaultProvider({ |
| 393 | context, |
| 394 | value, |
| 395 | children |
| 396 | }: { |
| 397 | context: React.Context<any>; |
| 398 | value: any; |
| 399 | children: any; |
| 400 | }) { |
| 401 | let inSelectValue = useContext(InsideSelectValueContext); |
| 402 | if (inSelectValue) { |
| 403 | return children; |
| 404 | } |
| 405 | return <context.Provider value={value}>{children}</context.Provider>; |
| 406 | } |
nothing calls this directly
no outgoing calls
no test coverage detected