MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / NameField

Function NameField

packages/react/src/plugins/secret-form.tsx:212–226  ·  view source on GitHub ↗
(props: { label?: string; placeholder?: string })

Source from the content-addressed store, hash-verified

210// ---------------------------------------------------------------------------
211
212function NameField(props: { label?: string; placeholder?: string }) {
213 const { state, actions } = useSecretForm();
214 const inputId = useId();
215 return (
216 <Field>
217 <FieldLabel htmlFor={inputId}>{props.label ?? "Name"}</FieldLabel>
218 <Input
219 id={inputId}
220 value={state.name}
221 onChange={(e) => actions.setName((e.target as HTMLInputElement).value)}
222 placeholder={props.placeholder ?? "GitHub PAT"}
223 />
224 </Field>
225 );
226}
227
228function IdField(props: { placeholder?: string }) {
229 const { actions, meta } = useSecretForm();

Callers

nothing calls this directly

Calls 1

useSecretFormFunction · 0.85

Tested by

no test coverage detected