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

Function NameField

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

Source from the content-addressed store, hash-verified

194// ---------------------------------------------------------------------------
195
196function NameField(props: { label?: string; placeholder?: string }) {
197 const { state, actions } = useSecretForm();
198 const inputId = useId();
199 return (
200 <Field>
201 <FieldLabel htmlFor={inputId}>{props.label ?? "Name"}</FieldLabel>
202 <Input
203 id={inputId}
204 value={state.name}
205 onChange={(e) => actions.setName((e.target as HTMLInputElement).value)}
206 placeholder={props.placeholder ?? "GitHub PAT"}
207 />
208 </Field>
209 );
210}
211
212function IdField(props: { placeholder?: string }) {
213 const { actions, meta } = useSecretForm();

Callers

nothing calls this directly

Calls 1

useSecretFormFunction · 0.85

Tested by

no test coverage detected