import React from 'react'; import { FormControl, FormLabel, Input, FormHelperText, FormErrorMessage } from '@chakra-ui/react'; // Red Hat brand colors const colors = { blue: "#0066cc", blueHover: "#004080", blueActive: "#002952", gray: { light: "#f5f5f5", medium: "#d2d2d2", dark: "#4c4c4c" } }; interface RedHatStyledInputProps { label?: string; value: string; onChange: (e: React.ChangeEvent) => void; placeholder?: string; name: string; id?: string; type?: string; isDisabled?: boolean; isRequired?: boolean; className?: string; helperText?: string; error?: string; } const RedHatStyledInput: React.FC = ({ label, value, onChange, placeholder = '', name, id, type = 'text', isDisabled = false, isRequired = false, className = '', helperText = '', error = '', ...props }) => { const inputId = id || `input-${name}`; const hasError = error !== ''; return ( {label && ( {label} )} {helperText && !hasError && ( {helperText} )} {hasError && ( {error} )} ); }; export default RedHatStyledInput;