#custom color with typescript ?

19 messages · Page 1 of 1 (latest)

stuck flare
#

theme.colors.brand is possibly undefined how to fix this

stoic iron
stuck flare
#

n in theme

stoic iron
# stuck flare

yes but what is the output of MantineThemeOverride['colors']

stuck flare
#

this output

stoic iron
#

you would have to define a custom interface or type for typescript to know

#

something like this

stuck flare
#

so i cant extend mantine theme directly to colors file? or i have to declare global module for this ?

#

can u give me some idea m new to typescript

#

interface CustomColor extends MantineColor {
brand: string[];
}

#

its not working

#

@cloud vapor

cloud vapor
stuck flare
#

@cloud vapor

#

its showing this error

cloud vapor