(
- ({ theme: customTheme = {}, className, ...props }, ref) => {
- const theme = mergeDeep(getTheme().hr.trimmed, customTheme);
+ ({ theme: customTheme, className, ...props }, ref) => {
+ const theme = resolveTheme([hrTheme.trimmed, getStore().theme?.hr?.trimmed, customTheme]);
return (
= ({
children,
className,
color = "default",
- theme: customTheme = {},
+ theme: customTheme,
value,
...props
}) => {
- const theme = mergeDeep(getTheme().helperText, customTheme);
+ const theme = resolveTheme([helperTextTheme, getStore().theme?.helperText, customTheme]);
return (
diff --git a/packages/ui/src/components/Kbd/Kbd.spec.tsx b/packages/ui/src/components/Kbd/Kbd.spec.tsx
index e7b2982ea..14e093b9c 100644
--- a/packages/ui/src/components/Kbd/Kbd.spec.tsx
+++ b/packages/ui/src/components/Kbd/Kbd.spec.tsx
@@ -15,7 +15,7 @@ describe("Components / Kbd", () => {
},
};
render(
-
+
,
);
diff --git a/packages/ui/src/components/Kbd/Kbd.tsx b/packages/ui/src/components/Kbd/Kbd.tsx
index 639075a77..260aa5b33 100644
--- a/packages/ui/src/components/Kbd/Kbd.tsx
+++ b/packages/ui/src/components/Kbd/Kbd.tsx
@@ -1,8 +1,9 @@
import type { ComponentProps, FC } from "react";
-import { twMerge } from "tailwind-merge";
-import { mergeDeep } from "../../helpers/merge-deep";
-import { getTheme } from "../../theme-store";
+import { resolveTheme } from "../../helpers/resolve-theme";
+import { twMerge } from "../../helpers/tailwind-merge";
+import { getStore } from "../../store";
import type { DeepPartial } from "../../types";
+import { kbdTheme } from "./theme";
export interface FlowbiteKbdTheme {
root: FlowbiteKbdRootTheme;
@@ -18,8 +19,8 @@ export interface KbdProps extends ComponentProps<"span"> {
theme?: DeepPartial;
}
-export const Kbd: FC = ({ children, className, icon: Icon, theme: customTheme = {}, ...props }) => {
- const theme = mergeDeep(getTheme().kbd, customTheme);
+export const Kbd: FC = ({ children, className, icon: Icon, theme: customTheme, ...props }) => {
+ const theme = resolveTheme([kbdTheme, getStore().theme?.kbd, customTheme]);
return (
diff --git a/packages/ui/src/components/Label/Label.spec.tsx b/packages/ui/src/components/Label/Label.spec.tsx
index e4e7deea4..f7244232a 100644
--- a/packages/ui/src/components/Label/Label.spec.tsx
+++ b/packages/ui/src/components/Label/Label.spec.tsx
@@ -45,7 +45,7 @@ describe("Components / Label", () => {
};
render(
-
+
,
);
diff --git a/packages/ui/src/components/Label/Label.tsx b/packages/ui/src/components/Label/Label.tsx
index cdc3611ba..a3223e66d 100644
--- a/packages/ui/src/components/Label/Label.tsx
+++ b/packages/ui/src/components/Label/Label.tsx
@@ -1,9 +1,10 @@
import type { ComponentProps, FC } from "react";
-import { twMerge } from "tailwind-merge";
-import { mergeDeep } from "../../helpers/merge-deep";
-import { getTheme } from "../../theme-store";
+import { resolveTheme } from "../../helpers/resolve-theme";
+import { twMerge } from "../../helpers/tailwind-merge";
+import { getStore } from "../../store";
import type { DeepPartial, DynamicStringEnumKeysOf } from "../../types";
-import type { FlowbiteStateColors } from "../Flowbite";
+import type { FlowbiteStateColors } from "../Flowbite/FlowbiteTheme";
+import { labelTheme } from "./theme";
export interface FlowbiteLabelTheme {
root: FlowbiteLabelRootTheme;
@@ -32,11 +33,11 @@ export const Label: FC = ({
className,
color = "default",
disabled = false,
- theme: customTheme = {},
+ theme: customTheme,
value,
...props
}) => {
- const theme = mergeDeep(getTheme().label, customTheme);
+ const theme = resolveTheme([labelTheme, getStore().theme?.label, customTheme]);
return (