From 42f9d05d1d7298add322fb4c1e8d1c732975bc1c Mon Sep 17 00:00:00 2001 From: Mateo Wartelle Date: Sun, 12 Nov 2023 07:44:12 -0600 Subject: [PATCH] feat(progress): add missing colors for Progress component - set default cyan --- examples/progress/progress.colors.tsx | 36 ++++++++++++++++++++++++--- src/components/Progress/Progress.tsx | 7 ++++-- src/components/Progress/theme.ts | 7 +++++- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/examples/progress/progress.colors.tsx b/examples/progress/progress.colors.tsx index 20f85cabf..1e87a057c 100644 --- a/examples/progress/progress.colors.tsx +++ b/examples/progress/progress.colors.tsx @@ -11,7 +11,7 @@ function Component() {
Dark
-
Blue
+
Blue
Red
@@ -23,6 +23,16 @@ function Component() {
Purple
+
Cyan
+ +
Gray
+ +
Lime
+ +
Pink
+ +
Teal
+
); } @@ -36,7 +46,7 @@ function Component() {
Dark
-
Blue
+
Blue
Red
@@ -48,6 +58,16 @@ function Component() {
Purple
+
Cyan
+ +
Gray
+ +
Lime
+ +
Pink
+ +
Teal
+
); } @@ -58,7 +78,7 @@ function Component() {
Dark
-
Blue
+
Blue
Red
@@ -70,6 +90,16 @@ function Component() {
Purple
+
Cyan
+ +
Gray
+ +
Lime
+ +
Pink
+ +
Teal
+
); } diff --git a/src/components/Progress/Progress.tsx b/src/components/Progress/Progress.tsx index d91cc351e..b1d49ae40 100644 --- a/src/components/Progress/Progress.tsx +++ b/src/components/Progress/Progress.tsx @@ -15,7 +15,10 @@ export interface FlowbiteProgressTheme { } export interface ProgressColor - extends Pick { + extends Pick< + FlowbiteColors, + 'dark' | 'blue' | 'red' | 'green' | 'yellow' | 'indigo' | 'purple' | 'cyan' | 'gray' | 'lime' | 'pink' | 'teal' + > { [key: string]: string; } @@ -36,7 +39,7 @@ export interface ProgressProps extends ComponentProps<'div'> { export const Progress: FC = ({ className, - color = 'blue', + color = 'cyan', labelProgress = false, labelText = false, progress, diff --git a/src/components/Progress/theme.ts b/src/components/Progress/theme.ts index b29e97bf7..12cf460ef 100644 --- a/src/components/Progress/theme.ts +++ b/src/components/Progress/theme.ts @@ -6,12 +6,17 @@ export const progressTheme: FlowbiteProgressTheme = { bar: 'rounded-full text-center font-medium leading-none text-cyan-300 dark:text-cyan-100 space-x-2', color: { dark: 'bg-gray-600 dark:bg-gray-300', - blue: 'bg-cyan-600', + blue: 'bg-blue-600', red: 'bg-red-600 dark:bg-red-500', green: 'bg-green-600 dark:bg-green-500', yellow: 'bg-yellow-400', indigo: 'bg-indigo-600 dark:bg-indigo-500', purple: 'bg-purple-600 dark:bg-purple-500', + cyan: 'bg-cyan-600', + gray: 'bg-gray-500', + lime: 'bg-lime-600', + pink: 'bg-pink-500', + teal: 'bg-teal-600', }, size: { sm: 'h-1.5',