extract to theme

This commit is contained in:
notmd
2023-02-01 14:53:28 +07:00
parent c8cd869594
commit 36e55c9bf4
3 changed files with 17 additions and 12 deletions
@@ -0,0 +1,14 @@
import { defineStyleConfig } from "@chakra-ui/react";
export const badgeTheme = defineStyleConfig({
baseStyle: {
borderRadius: "lg",
px: 2,
py: 0.5,
fontWeight: "600",
},
defaultProps: {
variant: "solid",
colorScheme: "blue",
},
});
+2
View File
@@ -2,6 +2,7 @@ import { type ThemeConfig, extendTheme } from "@chakra-ui/react";
import { Styles } from "@chakra-ui/theme-tools";
import { colors } from "./colors";
import { badgeTheme } from "./components/Badge";
import { cardTheme } from "./components/Card";
import { containerTheme } from "./components/Container";
@@ -12,6 +13,7 @@ const config: ThemeConfig = {
};
const components = {
Badge: badgeTheme,
Container: containerTheme,
Card: cardTheme,
};