From 562ad81591b53171a362854ab800c5630828611a Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Mon, 24 Mar 2025 13:36:02 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Checkbox=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/tailwind-config/tailwind.config.js | 12 +++++++ packages/ui/src/checkbox.tsx | 40 ++++++++++++--------- 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/packages/tailwind-config/tailwind.config.js b/packages/tailwind-config/tailwind.config.js index 13027d29c..4049cf3f0 100644 --- a/packages/tailwind-config/tailwind.config.js +++ b/packages/tailwind-config/tailwind.config.js @@ -49,6 +49,10 @@ module.exports = { accent: { DEFAULT: colors.gray["100"], }, + "action-bar": { + DEFAULT: colors.gray["800"], + foreground: colors.white, + }, muted: { DEFAULT: colors.gray["100"], background: colors.gray["50"], @@ -63,6 +67,14 @@ module.exports = { background: colors.white, foreground: colors.gray["700"], }, + sidebar: { + DEFAULT: colors.gray["100"], + foreground: colors.gray["700"], + accent: { + DEFAULT: colors.gray["200"], + foreground: colors.gray["800"], + }, + }, }, keyframes: { wiggle: { diff --git a/packages/ui/src/checkbox.tsx b/packages/ui/src/checkbox.tsx index 5317760e3..e5855eaed 100644 --- a/packages/ui/src/checkbox.tsx +++ b/packages/ui/src/checkbox.tsx @@ -1,31 +1,37 @@ "use client"; import * as CheckboxPrimitive from "@radix-ui/react-checkbox"; +import { Check, Minus } from "lucide-react"; import * as React from "react"; -import CheckboxCheckIcon from "./checkbox-check.svg"; import { cn } from "./lib/utils"; const Checkbox = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( - - (({ className, checked, ...props }, ref) => { + return ( + - - - -)); + + {checked === "indeterminate" ? ( + + ) : ( + + )} + + + ); +}); Checkbox.displayName = CheckboxPrimitive.Root.displayName; export { Checkbox };