(props: { placeholder?: string })
| 210 | } |
| 211 | |
| 212 | function IdField(props: { placeholder?: string }) { |
| 213 | const { actions, meta } = useSecretForm(); |
| 214 | const inputId = useId(); |
| 215 | return ( |
| 216 | <Field> |
| 217 | <FieldLabel htmlFor={inputId}>ID</FieldLabel> |
| 218 | <Input |
| 219 | id={inputId} |
| 220 | value={meta.id} |
| 221 | onChange={(e) => actions.setIdOverride((e.target as HTMLInputElement).value)} |
| 222 | placeholder={props.placeholder ?? "github-token"} |
| 223 | className="font-mono" |
| 224 | /> |
| 225 | {meta.duplicateError && <FieldError>{meta.duplicateError}</FieldError>} |
| 226 | </Field> |
| 227 | ); |
| 228 | } |
| 229 | |
| 230 | function ValueField(props: { revealable?: boolean; placeholder?: string; autoFocus?: boolean }) { |
| 231 | const { state, actions } = useSecretForm(); |
nothing calls this directly
no test coverage detected