This repository was archived by the owner on Sep 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed
packages/chakra-ui-core/types Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @chakra-ui/vue " : minor
3
+ " @chakra-ui/nuxt " : minor
4
+ ---
5
+
6
+ feat(types): add type exports for color mode & theme providers
Original file line number Diff line number Diff line change @@ -3,18 +3,36 @@ import { Theme } from "../../chakra-ui-theme/types"
3
3
import useToast from "../src/CToast"
4
4
import { ToastFactory } from '../src/CToast/CToast'
5
5
6
+ type ChakraIcons = { [ name : string ] : Icon } ;
7
+
6
8
declare module 'vue/types/vue' {
7
9
export interface Vue {
8
10
$toast : ToastFactory
9
11
$chakra : {
10
12
theme : Theme
11
- icons : { [ name : string ] : Icon }
13
+ icons : ChakraIcons
12
14
}
13
- chakraColorMode : string
14
- chakraToggleColorMode : string
15
15
}
16
16
}
17
17
18
+ declare module '../src/CColorModeProvider' {
19
+ export interface Provides {
20
+ $chakraColorMode : ( ) => 'light' | 'dark'
21
+ $toggleColorMode : ( ) => void
22
+ }
23
+ }
24
+
25
+ declare module '../src/CThemeProvider' {
26
+ export interface Provides {
27
+ $chakraTheme : Theme
28
+ $chakraIcons : ChakraIcons
29
+ $chakraColorMode : ( ) => 'light'
30
+ }
31
+ }
32
+
33
+ export { Provides as CColorModeProvides } from '../src/CColorModeProvider'
34
+ export { Provides as CThemeProvides } from '../src/CThemeProvider'
35
+
18
36
export const useToast : typeof useToast
19
37
export const defaultTheme : Theme
20
38
export * from './component'
You can’t perform that action at this time.
0 commit comments