fix: standardise checkboxes

Checkboxes were previously styled super wonky due to
the usage of checkboxClassName which styled the checkbox
trigger.

This change reverts all that and leaves it with sensible defaults
across dark and light mode.
This commit is contained in:
Mythie
2024-12-31 11:55:49 +11:00
parent 22fd1b5be1
commit 9d83bda12c
12 changed files with 5 additions and 59 deletions

View File

@ -155,8 +155,7 @@ export const ResendDocumentActionItem = ({
<FormControl>
<Checkbox
className="h-5 w-5 rounded-full data-[state=checked]:border-black data-[state=checked]:bg-black"
checkClassName="text-white"
className="h-5 w-5 rounded-full"
value={recipient.id}
checked={value.includes(recipient.id)}
onCheckedChange={(checked: boolean) =>
@ -179,7 +178,7 @@ export const ResendDocumentActionItem = ({
<DialogClose asChild>
<Button
type="button"
className="dark:bg-muted dark:hover:bg-muted/80 flex-1 bg-black/5 hover:bg-black/10"
className="dark:bg-muted dark:hover:bg-muted/80 flex-1 bg-black/5 hover:bg-black/10"
variant="secondary"
disabled={isSubmitting}
>

View File

@ -313,7 +313,6 @@ export function UseTemplateDialog({
<Checkbox
id="distributeDocument"
className="h-5 w-5"
checkClassName="dark:text-white text-primary"
checked={field.value}
onCheckedChange={field.onChange}
/>

View File

@ -258,7 +258,6 @@ export const CheckboxField = ({
<div key={index} className="flex items-center gap-x-1.5">
<Checkbox
className="h-4 w-4"
checkClassName="text-white"
id={`checkbox-${index}`}
checked={checkedValues.includes(itemValue)}
onCheckedChange={() => handleCheckboxChange(item.value, item.id)}
@ -282,7 +281,6 @@ export const CheckboxField = ({
<div key={index} className="flex items-center gap-x-1.5">
<Checkbox
className="h-3 w-3"
checkClassName="text-white"
id={`checkbox-${index}`}
checked={parsedCheckedValues.includes(itemValue)}
disabled={isLoading}

View File

@ -217,45 +217,10 @@ export const TransferTeamDialog = ({
)}
/>
{/* Temporary removed. */}
{/* {IS_BILLING_ENABLED && (
<FormField
control={form.control}
name="clearPaymentMethods"
render={({ field }) => (
<FormItem>
<div className="flex flex-row items-center">
<Checkbox
id="clearPaymentMethods"
className="h-5 w-5 rounded-full"
checkClassName="dark:text-white text-primary"
checked={field.value}
onCheckedChange={field.onChange}
/>
<label
className="text-muted-foreground ml-2 text-sm"
htmlFor="clearPaymentMethods"
>
Clear current payment methods
</label>
</div>
</FormItem>
)}
/>
)} */}
<Alert variant="neutral">
<AlertDescription>
<ul className="list-outside list-disc space-y-2 pl-4">
{IS_BILLING_ENABLED() && (
// Temporary removed.
// <li>
// {form.getValues('clearPaymentMethods')
// ? 'You will not be billed for any upcoming invoices'
// : 'We will continue to bill current payment methods if required'}
// </li>
<li>
<Trans>
Any payment methods attached to this team will remain attached to this