mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
more consistent styling
This commit is contained in:
@@ -40,7 +40,7 @@ export function Field({
|
|||||||
}, [isTouched, validate, value]);
|
}, [isTouched, validate, value]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-1 w-full">
|
||||||
<div className="flex items-end justify-between w-full text-xs">
|
<div className="flex items-end justify-between w-full text-xs">
|
||||||
<Label htmlFor={label} className="flex items-center text-sm">
|
<Label htmlFor={label} className="flex items-center text-sm">
|
||||||
{label}
|
{label}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ function Input({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"border-input dark:bg-input/30 flex h-9 w-full min-w-0 items-center border bg-transparent shadow-xs",
|
"border-input dark:bg-input/30 flex h-9 w-full min-w-0 items-center border bg-transparent",
|
||||||
"transition-[color,box-shadow]",
|
"transition-[color,box-shadow]",
|
||||||
"has-[:focus-visible]:border-ring",
|
"has-[:focus-visible]:border-ring",
|
||||||
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
||||||
@@ -27,7 +27,7 @@ function Input({
|
|||||||
data-slot="input"
|
data-slot="input"
|
||||||
className={cn(
|
className={cn(
|
||||||
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground",
|
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground",
|
||||||
"h-full w-full min-w-0 bg-transparent px-3 py-1 pr-1 text-base outline-none",
|
"h-full flex-1 min-w-0 bg-transparent px-3 py-1 pr-1 text-base outline-none",
|
||||||
"file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
"file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
||||||
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
||||||
)}
|
)}
|
||||||
@@ -36,7 +36,7 @@ function Input({
|
|||||||
{showCounter && currentLength !== undefined && maxLength !== undefined && (
|
{showCounter && currentLength !== undefined && maxLength !== undefined && (
|
||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
"border-l px-2 h-full flex items-center justify-center text-[11px] tabular-nums",
|
"border-l px-2 h-full flex w-fit items-center justify-center text-[11px] tabular-nums",
|
||||||
currentLength / maxLength >= 1
|
currentLength / maxLength >= 1
|
||||||
? "text-destructive"
|
? "text-destructive"
|
||||||
: currentLength / maxLength >= 0.75
|
: currentLength / maxLength >= 0.75
|
||||||
|
|||||||
Reference in New Issue
Block a user