@@ -17,6 +17,7 @@ import {
1717import { useQuery } from '@tanstack/react-query'
1818import { createContext , ReactNode , useContext , useMemo } from 'react'
1919import { useSdk } from './sdk-provider'
20+ import { Input , MantineThemeOverride , Paper , Select } from '@mantine/core'
2021
2122export interface AppConfigContext {
2223 appLogoUrlDark ?: string | undefined
@@ -35,6 +36,33 @@ export interface AppConfigContext {
3536
3637const Context = createContext < AppConfigContext > ( { } as AppConfigContext )
3738
39+ const themeOverrides : MantineThemeOverride = {
40+ components : {
41+ Paper : Paper . extend ( {
42+ styles : {
43+ root : {
44+ backgroundColor : 'transparent' ,
45+ } ,
46+ } ,
47+ } ) ,
48+
49+ Input : Input . extend ( {
50+ styles : {
51+ input : {
52+ backgroundColor : 'transparent' ,
53+ } ,
54+ } ,
55+ } ) ,
56+ Select : Select . extend ( {
57+ styles : {
58+ input : {
59+ backgroundColor : 'transparent' ,
60+ } ,
61+ } ,
62+ } ) ,
63+ } ,
64+ }
65+
3866export function AppConfigProvider ( { children } : { children : ReactNode } ) {
3967 const sdk = useSdk ( )
4068 const configQuery = useQuery ( {
@@ -60,10 +88,10 @@ export function AppConfigProvider({ children }: { children: ReactNode }) {
6088 const color =
6189 appConfig ?. appThemeColor && mantineColorIds . includes ( appConfig . appThemeColor ) ? appConfig . appThemeColor : 'blue'
6290 const background : BackgroundColors = appConfig ?. appThemeBackground as BackgroundColors
63- const override =
91+ const override : MantineThemeOverride =
6492 background ?. length && backgroundColorIds . includes ( background )
65- ? { colors : { dark : BACKGROUND_COLORS [ background ] } }
66- : { }
93+ ? { ... themeOverrides , colors : { dark : BACKGROUND_COLORS [ background ] } }
94+ : themeOverrides
6795 return themeWithBrand ( color , override )
6896 } , [ appConfig ] )
6997
0 commit comments