(props: T)
| 69 | |
| 70 | let FormContext = React.createContext<FormContextValue | null>(null); |
| 71 | export function useFormProps<T extends SpectrumLabelableProps>(props: T): T { |
| 72 | let ctx = useContext(FormContext); |
| 73 | if (ctx) { |
| 74 | return {...ctx, ...props}; |
| 75 | } |
| 76 | |
| 77 | return props; |
| 78 | } |
| 79 | |
| 80 | const formPropNames = new Set([ |
| 81 | 'action', |
no outgoing calls
no test coverage detected