Skip to content

Commit 98e8114

Browse files
authored
Merge pull request #89 from UgnisSoftware/UGN-337
Fix UGN-337 remove enforced button color in dropzone
2 parents 449f559 + 4598c94 commit 98e8114

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/components/Providers.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ChakraProvider, extendTheme } from "@chakra-ui/react"
22
import { createContext } from "react"
33
import type { RsiProps } from "../types"
4-
import { colorSchemeOverrides, CustomTheme, themeOverrides } from "../theme"
4+
import type { CustomTheme } from "../theme"
55

66
export const RsiContext = createContext({} as any)
77

@@ -14,8 +14,9 @@ type ProvidersProps<T extends string> = {
1414
export const rootId = "chakra-modal-rsi"
1515

1616
export const Providers = <T extends string>({ children, theme, rsiValues }: ProvidersProps<T>) => {
17-
const mergedTheme = extendTheme(colorSchemeOverrides, theme)
17+
const mergedTheme = extendTheme(theme)
1818

19+
console.log(mergedTheme)
1920
if (!rsiValues.fields) {
2021
throw new Error("Fields must be provided to react-spreadsheet-import")
2122
}

src/theme.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ export const themeOverrides = {
104104
},
105105
dropZoneBorder: "rsi.500",
106106
dropzoneButton: {
107-
bg: "rsi.500",
108107
mt: "1rem",
109108
},
110109
},
@@ -373,6 +372,11 @@ export const themeOverrides = {
373372
},
374373
},
375374
},
375+
Button: {
376+
defaultProps: {
377+
colorScheme: "rsi",
378+
},
379+
},
376380
},
377381
styles: {
378382
global: {
@@ -472,9 +476,4 @@ export const themeOverrides = {
472476
},
473477
} as const
474478

475-
export const colorSchemeOverrides = withDefaultColorScheme({
476-
colorScheme: "rsi",
477-
components: ["Button"],
478-
})
479-
480479
export type CustomTheme = DeepPartial<typeof themeOverrides>

0 commit comments

Comments
 (0)