import { Input } from '@/components/ui/input' import { Label } from '@/components/ui/label' import { SANDBOX_CPUS_MAX, SANDBOX_CPUS_MIN, SANDBOX_MEMORY_GIB_MAX, SANDBOX_MEMORY_GIB_MIN, } from '@/lib/sandboxResources' type SandboxResourceInputsProps = { idPrefix: string cpus: string onCpusChange: (value: string) => void memoryGib: string onMemoryGibChange: (value: string) => void cpusPlaceholder?: string memoryPlaceholder?: string disabled?: boolean error?: string | null } export function SandboxResourceInputs({ idPrefix, cpus, onCpusChange, memoryGib, onMemoryGibChange, cpusPlaceholder, memoryPlaceholder, disabled, error, }: SandboxResourceInputsProps) { const cpusId = `${idPrefix}-cpus` const memoryId = `${idPrefix}-memory` return (
onCpusChange(event.target.value)} placeholder={cpusPlaceholder} disabled={disabled} />
onMemoryGibChange(event.target.value)} placeholder={memoryPlaceholder} disabled={disabled} />
{error ? (

{error}

) : null}
) }