refactor: update button styles in Counter component and improve Badge variant handling in forms
This commit is contained in:
parent
7c88d0af86
commit
b741f7ce72
3 changed files with 10 additions and 18 deletions
|
|
@ -26,7 +26,7 @@ export const Counter = ({
|
|||
|
||||
<div className="flex items-center rounded-md border px-1">
|
||||
<button
|
||||
className="flex size-10 items-center justify-center leading-10 transition hover:opacity-75 disabled:opacity-50"
|
||||
className="flex size-10 cursor-pointer items-center justify-center leading-10 transition hover:opacity-75 disabled:opacity-50"
|
||||
disabled={disabled}
|
||||
onClick={() => handleChange(-1)}
|
||||
type="button"
|
||||
|
|
@ -50,7 +50,7 @@ export const Counter = ({
|
|||
/>
|
||||
|
||||
<button
|
||||
className="flex size-10 items-center justify-center leading-10 transition hover:opacity-75 disabled:opacity-50"
|
||||
className="flex size-10 cursor-pointer items-center justify-center leading-10 transition hover:opacity-75 disabled:opacity-50"
|
||||
disabled={disabled}
|
||||
onClick={() => handleChange(1)}
|
||||
type="button"
|
||||
|
|
|
|||
|
|
@ -207,9 +207,9 @@ export const FormNewServizio = ({
|
|||
onValueChange={(vals) => {
|
||||
field.onChange(Number(vals[0]));
|
||||
}}
|
||||
rangeClassName="bg-neutral-700"
|
||||
rangeClassName="bg-primary"
|
||||
step={50}
|
||||
thumbClassName="border-neutral-700"
|
||||
thumbClassName="border-primary"
|
||||
value={[form.getValues("budget")]}
|
||||
/>
|
||||
</FormControl>
|
||||
|
|
@ -574,15 +574,11 @@ export const FormNewServizio = ({
|
|||
<FormItem>
|
||||
<FormControl>
|
||||
<Badge
|
||||
className={cn(
|
||||
"cursor-pointer text-sm",
|
||||
field.value
|
||||
? "bg-neutral-800 hover:bg-neutral-800 sm:hover:bg-neutral-900/80"
|
||||
: "bg-neutral-200 text-neutral-700 hover:bg-neutral-200 sm:hover:bg-neutral-900/80 sm:hover:text-neutral-50",
|
||||
)}
|
||||
className={cn("cursor-pointer text-sm")}
|
||||
onClick={() => {
|
||||
field.onChange(!field.value);
|
||||
}}
|
||||
variant={field.value ? "default" : "secondary"}
|
||||
>
|
||||
{pair[1]}
|
||||
</Badge>
|
||||
|
|
|
|||
|
|
@ -811,7 +811,7 @@ export const FormNewServizioAcquisto = ({
|
|||
"h-[42px] w-full pl-3 text-left font-medium",
|
||||
!field.value && "text-muted-foreground",
|
||||
"rounded-lg border border-neutral-300 shadow-xs outline-hidden file:border-0 file:bg-transparent file:font-medium file:text-sm disabled:cursor-not-allowed disabled:opacity-50 dark:focus:border-transparent",
|
||||
)}
|
||||
)}
|
||||
id="scadenza_motivazione_transitoria"
|
||||
variant={"outline"}
|
||||
>
|
||||
|
|
@ -892,15 +892,11 @@ export const FormNewServizioAcquisto = ({
|
|||
<FormItem>
|
||||
<FormControl>
|
||||
<Badge
|
||||
className={cn(
|
||||
"cursor-pointer text-sm",
|
||||
field.value
|
||||
? "bg-neutral-800 hover:bg-neutral-800 sm:hover:bg-neutral-900/80"
|
||||
: "bg-neutral-200 text-neutral-700 hover:bg-neutral-200 sm:hover:bg-neutral-900/80 sm:hover:text-neutral-50",
|
||||
)}
|
||||
className={cn("cursor-pointer text-sm")}
|
||||
onClick={() => {
|
||||
field.onChange(!field.value);
|
||||
}}
|
||||
variant={field.value ? "default" : "secondary"}
|
||||
>
|
||||
{pair[1]}
|
||||
</Badge>
|
||||
|
|
@ -1011,7 +1007,7 @@ export const FormNewServizioAcquisto = ({
|
|||
"h-[42px] w-full pl-3 text-left font-medium",
|
||||
!field.value && "text-muted-foreground",
|
||||
"rounded-lg border border-neutral-300 shadow-xs outline-hidden file:border-0 file:bg-transparent file:font-medium file:text-sm disabled:cursor-not-allowed disabled:opacity-50 dark:focus:border-transparent",
|
||||
)}
|
||||
)}
|
||||
id="dataNascita"
|
||||
variant={"outline"}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue