mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-12-23 09:34:23 +00:00
Add support for extra arguments in frontend
This commit is contained in:
27
webui/src/components/form/EnvVarsInput.tsx
Normal file
27
webui/src/components/form/EnvVarsInput.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import React from 'react'
|
||||
import KeyValueInput from './KeyValueInput'
|
||||
|
||||
interface EnvVarsInputProps {
|
||||
id: string
|
||||
label: string
|
||||
value: Record<string, string> | undefined
|
||||
onChange: (value: Record<string, string> | undefined) => void
|
||||
description?: string
|
||||
disabled?: boolean
|
||||
className?: string
|
||||
}
|
||||
|
||||
const EnvVarsInput: React.FC<EnvVarsInputProps> = (props) => {
|
||||
return (
|
||||
<KeyValueInput
|
||||
{...props}
|
||||
keyPlaceholder="Variable name"
|
||||
valuePlaceholder="Variable value"
|
||||
addButtonText="Add Variable"
|
||||
helperText="Environment variables that will be passed to the backend process"
|
||||
allowEmptyValues={false}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export default EnvVarsInput
|
||||
Reference in New Issue
Block a user