#Getting custom theme type in sx and styles

4 messages · Page 1 of 1 (latest)

steel cedar
#

Hi there,

I want to get intellisense on the custom theme that I pass to MantineProvider.

for the following MantineProvider,

<MantineProvider
  theme={{
    colors: {
      myCustomColor: [
        "#fff4e6",
        "#ffe8cc",
        "#ffd8a8",
        "#ffc078",
        "#ffa94d",
        "#ff922b",
        "#fd7e14",
        "#f76707",
        "#e8590c",
        "#d9480f",
      ],
    },
  }}

I want to get a myCustomColor suggestion when I use the theme parameter that comes with sx and styles (see screenshot)

#

I browsed the docs and the questions here in discord, but I couldn't find anything about this

#

this is the direction I went in, if I declare a variable in my codebase to be of type MantineTheme, clicking on MantineTheme redirects me to this file.

but the functions that use MantineTheme inside of the mantine library still use the one declared inside of the library, so I'm not getting my suggestions in sx and styles .

plush lagoon