Model Form Styling

This commit is contained in:
blessedcoolant
2022-12-27 04:07:40 +13:00
parent df858eb3f9
commit ce6fb8ea29
9 changed files with 161 additions and 141 deletions

View File

@@ -6,7 +6,7 @@ interface IAIInputProps extends InputProps {
label?: string;
width?: string | number;
value?: string;
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
}
export default function IAIInput(props: IAIInputProps) {
@@ -26,17 +26,19 @@ export default function IAIInput(props: IAIInputProps) {
isInvalid={isInvalid}
isDisabled={isDisabled}
>
<FormLabel
fontSize={fontSize}
fontWeight="bold"
alignItems="center"
whiteSpace="nowrap"
marginBottom={0}
marginRight={0}
className="input-label"
>
{label}
</FormLabel>
{label !== '' && (
<FormLabel
fontSize={fontSize}
fontWeight="bold"
alignItems="center"
whiteSpace="nowrap"
marginBottom={0}
marginRight={0}
className="input-label"
>
{label}
</FormLabel>
)}
<Input {...rest} className="input-entry" size={'sm'} width={width} />
</FormControl>
);

View File

@@ -24,7 +24,7 @@ interface Props extends Omit<NumberInputProps, 'onChange'> {
labelFontSize?: string | number;
width?: string | number;
showStepper?: boolean;
value: number;
value?: number;
onChange: (v: number) => void;
min: number;
max: number;