From 90367262ed8a27d8f64bb1a7023314dcd6421bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Patoprst=C3=BD?= <74960517+iamtomffee@users.noreply.github.com> Date: Wed, 20 Sep 2023 18:13:29 +0200 Subject: [PATCH 1/3] [docs] Fix incorrect Redwood guide link (#4818) --- docs/pages/guides/redwood.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/guides/redwood.mdx b/docs/pages/guides/redwood.mdx index 66e42f00e07..d4f33949d00 100644 --- a/docs/pages/guides/redwood.mdx +++ b/docs/pages/guides/redwood.mdx @@ -9,7 +9,7 @@ export default Layout(MDX_DATA.Redwood); ## Generate new application -Follow [Redwood getting started guide](https://remix.run/) guide to +Follow [Redwood getting started guide](https://redwoodjs.com/docs/quick-start) guide to create new Redwood application: ```bash From 350051a3c40e51197bda27d818db013f9bdb90eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateus=20Queir=C3=B3s?= <45767743+mateuscqueiros@users.noreply.github.com> Date: Wed, 20 Sep 2023 13:45:07 -0300 Subject: [PATCH 2/3] [@mantine/core] Table: Fix row hover not working in dark mode when `striped` prop is set (#4817) --- src/mantine-core/src/components/Table/Table.module.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mantine-core/src/components/Table/Table.module.css b/src/mantine-core/src/components/Table/Table.module.css index b65cbcf3960..f295eb906a2 100644 --- a/src/mantine-core/src/components/Table/Table.module.css +++ b/src/mantine-core/src/components/Table/Table.module.css @@ -37,7 +37,7 @@ background-color: var(--_tr-bg, transparent); @mixin hover { - --_tr-bg: var(--_tr-hover-bg, transparent); + --_tr-bg: var(--_tr-hover-bg, transparent) !important; } &[data-with-row-border] { From 41d11eec2fcf06a6ad4ee1d02762476bce9d8da2 Mon Sep 17 00:00:00 2001 From: Matheus Vellone Date: Wed, 20 Sep 2023 16:37:14 -0300 Subject: [PATCH 3/3] [@mantine/core] Fix broken colors override type (#4816) * [@mantine/core] make MantineThemeColorsOverride an interface instead of type * [docs] add TS instructions to add custom colors --- docs/pages/theming/colors.mdx | 16 ++++++++++++++++ .../src/core/MantineProvider/theme.types.ts | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/pages/theming/colors.mdx b/docs/pages/theming/colors.mdx index 3da3dcfe9e0..ff08c4c3890 100644 --- a/docs/pages/theming/colors.mdx +++ b/docs/pages/theming/colors.mdx @@ -202,3 +202,19 @@ function Demo() { ## Default colors + +## Add custom colors types + +TypeScript will only autocomplete Mantine's default colors when accessing the theme. To add your custom colors to the MantineColor type, you can use TypeScript module declaration. + +```ts +import { DefaultMantineColor, MantineColorsTuple } from '@mantine/core'; + +type ExtendedCustomColors = 'primaryColorName' | 'secondaryColorName' | DefaultMantineColor; + +declare module '@mantine/core' { + export interface MantineThemeColorsOverride { + colors: Record; + } +} +``` \ No newline at end of file diff --git a/src/mantine-core/src/core/MantineProvider/theme.types.ts b/src/mantine-core/src/core/MantineProvider/theme.types.ts index 20df77414e1..a389b1b886e 100644 --- a/src/mantine-core/src/core/MantineProvider/theme.types.ts +++ b/src/mantine-core/src/core/MantineProvider/theme.types.ts @@ -201,7 +201,7 @@ export type DefaultMantineColor = | 'teal' | (string & {}); -export type MantineThemeColorsOverride = {}; +export interface MantineThemeColorsOverride {} export type MantineThemeColors = MantineThemeColorsOverride extends { colors: Record;