Skip to content

Commit bc6ff8d

Browse files
authored
feat: enable custom names for dark and light themes
1 parent e182039 commit bc6ff8d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stitches.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ export const { styled, css, createTheme, getCssText, globalCss, keyframes, confi
273273
// @ts-expect-error
274274
export const utils = config.utils;
275275

276-
export const darkTheme = (primary: PrimaryColor) => {
276+
export const darkTheme = (primary: PrimaryColor, name = 'dark') => {
277277
const darkPrimaryColor = getPrimaryColorInfo(primary, darkColors);
278278

279-
return createTheme('dark', {
279+
return createTheme(name, {
280280
colors: {
281281
...darkColors,
282282

@@ -312,10 +312,10 @@ export const darkTheme = (primary: PrimaryColor) => {
312312
});
313313
};
314314

315-
export const lightTheme = (primary: PrimaryColor) => {
315+
export const lightTheme = (primary: PrimaryColor, name = 'light') => {
316316
const lightPrimaryColor = getPrimaryColorInfo(primary, lightColors);
317317

318-
return createTheme('light', {
318+
return createTheme(name, {
319319
colors: {
320320
primary: lightPrimaryColor.token,
321321
...AccordionTheme.getLight(lightPrimaryColor),

0 commit comments

Comments
 (0)