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

Function IdField

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

Source from the content-addressed store, hash-verified

226}
227
228function IdField(props: { placeholder?: string }) {
229 const { actions, meta } = useSecretForm();
230 const inputId = useId();
231 return (
232 <Field>
233 <FieldLabel htmlFor={inputId}>ID</FieldLabel>
234 <Input
235 id={inputId}
236 value={meta.id}
237 onChange={(e) => actions.setIdOverride((e.target as HTMLInputElement).value)}
238 placeholder={props.placeholder ?? "github-token"}
239 className="font-mono"
240 />
241 {meta.duplicateError && <FieldError>{meta.duplicateError}</FieldError>}
242 </Field>
243 );
244}
245
246function ValueField(props: { revealable?: boolean; placeholder?: string; autoFocus?: boolean }) {
247 const { state, actions } = useSecretForm();

Callers

nothing calls this directly

Calls 1

useSecretFormFunction · 0.85

Tested by

no test coverage detected