Skip to content

Commit cddbb15

Browse files
committed
chore: export theme type
1 parent a3ea8b3 commit cddbb15

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

packages/devtools-ui/src/components/theme.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import { createContext, createEffect, createSignal, useContext } from 'solid-js'
22
import type { Accessor, JSX } from 'solid-js'
33

4-
export type Theme = 'light' | 'dark'
4+
export type ThemeType = 'light' | 'dark'
55

66
type ThemeContextValue = {
7-
theme: Accessor<Theme>
8-
setTheme: (theme: Theme) => void
7+
theme: Accessor<ThemeType>
8+
setTheme: (theme: ThemeType) => void
99
}
1010
const ThemeContext = createContext<ThemeContextValue | undefined>(undefined)
1111

1212
export const ThemeContextProvider = (props: {
1313
children: JSX.Element
14-
theme: Theme
14+
theme: ThemeType
1515
}) => {
16-
const [theme, setTheme] = createSignal<Theme>(props.theme)
16+
const [theme, setTheme] = createSignal<ThemeType>(props.theme)
1717
createEffect(() => {
1818
setTheme(props.theme)
1919
})

packages/devtools-ui/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export {
1414
} from './components/section'
1515
export { Header, HeaderLogo } from './components/header'
1616
export { useTheme, ThemeContextProvider } from './components/theme'
17+
export type { ThemeType } from './components/theme'
1718
export {
1819
CheckCircleIcon,
1920
ChevronDownIcon,

0 commit comments

Comments
 (0)