diff --git a/server/routers/org/createOrg.ts b/server/routers/org/createOrg.ts index c501ebf..d264eac 100644 --- a/server/routers/org/createOrg.ts +++ b/server/routers/org/createOrg.ts @@ -57,15 +57,15 @@ export async function createOrg( ); } - const userOrgIds = req.userOrgIds; - if (userOrgIds && userOrgIds.length > MAX_ORGS) { - return next( - createHttpError( - HttpCode.FORBIDDEN, - `Maximum number of organizations reached.` - ) - ); - } + // const userOrgIds = req.userOrgIds; + // if (userOrgIds && userOrgIds.length > MAX_ORGS) { + // return next( + // createHttpError( + // HttpCode.FORBIDDEN, + // `Maximum number of organizations reached.` + // ) + // ); + // } const { orgId, name } = parsedBody.data; diff --git a/src/components/ui/checkbox.tsx b/src/components/ui/checkbox.tsx index 6a65a30..33f61da 100644 --- a/src/components/ui/checkbox.tsx +++ b/src/components/ui/checkbox.tsx @@ -5,22 +5,44 @@ import * as CheckboxPrimitive from "@radix-ui/react-checkbox"; import { Check } from "lucide-react"; import { cn } from "@app/lib/cn"; +import { cva, type VariantProps } from "class-variance-authority"; + +// Define checkbox variants +const checkboxVariants = cva( + "peer h-4 w-4 shrink-0 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", + { + variants: { + variant: { + outlinePrimary: + "border-2 rounded-sm border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", + outline: + "border-2 rounded-sm border-input data-[state=checked]:bg-muted data-[state=checked]:text-accent-foreground", + outlinePrimarySquare: + "border-2 rounded-[20%] border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", + outlineSquare: + "border-2 rounded-[20%] border-input data-[state=checked]:bg-muted data-[state=checked]:text-accent-foreground" + } + }, + defaultVariants: { + variant: "outlinePrimary" + } + } +); + +interface CheckboxProps + extends React.ComponentPropsWithoutRef, + VariantProps {} const Checkbox = React.forwardRef< React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( + CheckboxProps +>(({ className, variant, ...props }, ref) => ( - +