import React from 'react'; import { TextInput, TextInputProps } from '../TextInput/TextInput'; import { Error } from '../Error/Error'; import { Text } from '../Text/Text'; import { useTheme } from '../../core/theme/ThemeProvider'; import { useStyles } from '../../core/hooks/useStyles'; interface InputProps extends TextInputProps { label?: string; error?: string; } export const Input: React.FC = ({ label, id, error, className = '', ...props }) => { const { theme } = useTheme(); const createStyle = useStyles('input-wrapper'); const containerClass = createStyle({ display: 'grid', gap: '4px', width: '100%', }); return (
{label && ( )} {error}
); };