Move request-related settings to workspace

This commit is contained in:
Gregory Schier
2024-01-15 11:52:36 -08:00
parent b01747299f
commit 34a8fc4e22
23 changed files with 207 additions and 148 deletions

View File

@@ -17,7 +17,7 @@ export function Checkbox({ checked, onChange, className, disabled, title, hideLa
as="label"
space={2}
alignItems="center"
className={classNames(className, disabled && 'opacity-disabled')}
className={classNames(className, 'text-gray-900 text-sm', disabled && 'opacity-disabled')}
>
<div className="relative flex">
<input

View File

@@ -74,7 +74,7 @@
}
.cm-scroller {
@apply font-mono text-[0.8rem] overflow-hidden;
@apply font-mono text-xs overflow-hidden;
}
.cm-line {

View File

@@ -26,6 +26,7 @@ export type InputProps = Omit<
type?: 'text' | 'password';
label: string;
hideLabel?: boolean;
labelPosition?: 'top' | 'left';
labelClassName?: string;
containerClassName?: string;
onChange?: (value: string) => void;
@@ -34,7 +35,7 @@ export type InputProps = Omit<
defaultValue?: string;
leftSlot?: ReactNode;
rightSlot?: ReactNode;
size?: 'sm' | 'md' | 'auto';
size?: 'xs' | 'sm' | 'md' | 'auto';
className?: string;
placeholder?: string;
validate?: (v: string) => boolean;
@@ -50,6 +51,7 @@ export const Input = forwardRef<EditorView | undefined, InputProps>(function Inp
hideLabel,
label,
labelClassName,
labelPosition = 'top',
leftSlot,
name,
onBlur,
@@ -115,12 +117,19 @@ export const Input = forwardRef<EditorView | undefined, InputProps>(function Inp
);
return (
<VStack ref={wrapperRef} className="w-full">
<div
ref={wrapperRef}
className={classNames(
'w-full',
labelPosition === 'left' && 'flex items-center gap-2',
labelPosition === 'top' && 'flex-row gap-0.5',
)}
>
<label
htmlFor={id}
className={classNames(
labelClassName,
'font-semibold text-xs uppercase text-gray-700',
'text-sm text-gray-900 whitespace-nowrap',
hideLabel && 'sr-only',
)}
>
@@ -136,6 +145,7 @@ export const Input = forwardRef<EditorView | undefined, InputProps>(function Inp
!isValid && '!border-invalid',
size === 'md' && 'h-md',
size === 'sm' && 'h-sm',
size === 'xs' && 'h-xs',
size === 'auto' && 'min-h-sm',
)}
>
@@ -177,7 +187,7 @@ export const Input = forwardRef<EditorView | undefined, InputProps>(function Inp
)}
{rightSlot}
</HStack>
</VStack>
</div>
);
});