mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
fix: improve field sizing (#1486)
## Description Allows for smaller field sizing in addition to improving our styling when displaying labels on smaller fields. This is the minimum currently supported field size until we perform a more extensive refactor of our current drag and drop system. ## Related Issue Reported via support channels ## Changes Made - Updated our minimum size constraints - Attempted to add a general autosizing component for text and failed - Updated styling in a bunch of places to use the css `clamp()` method for dynamic sizing.
This commit is contained in:
@ -45,7 +45,7 @@ export const FieldIcon = ({
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
'text-field-card-foreground flex items-center justify-center gap-x-1 text-[clamp(0.875rem,1.8cqw,1.2rem)]',
|
||||
'text-field-card-foreground flex items-center justify-center gap-x-1 text-[clamp(0.575rem,25cqw,1.2rem)]',
|
||||
fontCaveatClassName,
|
||||
)}
|
||||
>
|
||||
@ -71,8 +71,9 @@ export const FieldIcon = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="text-field-card-foreground flex items-center justify-center gap-x-1.5 text-[clamp(0.625rem,1cqw,0.825rem)]">
|
||||
<Icon className="h-4 w-4" /> {label}
|
||||
<div className="text-field-card-foreground flex items-center justify-center gap-x-1.5 text-[clamp(0.425rem,25cqw,0.825rem)]">
|
||||
<Icon className="h-[clamp(0.625rem,20cqw,0.925rem)] w-[clamp(0.625rem,20cqw,0.925rem)]" />{' '}
|
||||
{label}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user