This repository was archived by the owner on Sep 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +9
-20
lines changed Expand file tree Collapse file tree 4 files changed +9
-20
lines changed Original file line number Diff line number Diff line change 1
1
import { h , defineComponent , PropType , computed } from 'vue'
2
2
import {
3
3
chakra ,
4
- ColorScheme ,
5
4
ThemingProps ,
6
5
useMultiStyleConfig ,
7
6
useStyles ,
@@ -14,19 +13,19 @@ import { CIcon } from '@chakra-ui/c-icon'
14
13
15
14
const STATUSES = {
16
15
info : {
17
- colorScheme : 'blue' as ColorScheme ,
16
+ colorScheme : 'blue' ,
18
17
icon : 'info' ,
19
18
} ,
20
19
success : {
21
- colorScheme : 'green' as ColorScheme ,
20
+ colorScheme : 'green' ,
22
21
icon : 'check-circle' ,
23
22
} ,
24
23
warning : {
25
- colorScheme : 'orange' as ColorScheme ,
24
+ colorScheme : 'orange' ,
26
25
icon : 'warning-alt' ,
27
26
} ,
28
27
error : {
29
- colorScheme : 'red' as ColorScheme ,
28
+ colorScheme : 'red' ,
30
29
icon : 'warning' ,
31
30
} ,
32
31
}
@@ -62,7 +61,7 @@ export const CAlert = defineComponent({
62
61
default : 'info' ,
63
62
} ,
64
63
colorScheme : {
65
- type : [ String ] as PropType < ColorScheme > ,
64
+ type : [ String ] as PropType < string > ,
66
65
} ,
67
66
styleConfig : {
68
67
type : [ Object ] as PropType < any > ,
@@ -73,7 +72,7 @@ export const CAlert = defineComponent({
73
72
} ,
74
73
} ,
75
74
setup ( props , { slots, attrs } ) {
76
- const colorScheme : ColorScheme =
75
+ const colorScheme : string =
77
76
props . colorScheme || STATUSES [ props . status ] . colorScheme
78
77
79
78
const themingProps : ThemingProps = {
Original file line number Diff line number Diff line change 4
4
SystemStyleObject ,
5
5
} from '@chakra-ui/styled-system'
6
6
import { chakra , ThemingProps } from '@chakra-ui/vue-system'
7
- import { ComponentThemeConfig } from '@chakra-ui/vue-theme'
8
7
import { createContext } from '@chakra-ui/vue-utils'
9
8
10
9
export interface ButtonGroupProps extends ThemingProps {
@@ -41,7 +40,7 @@ const props = {
41
40
default : 'sm' ,
42
41
} ,
43
42
colorScheme : String as PropType < string > ,
44
- styleConfig : String as PropType < ComponentThemeConfig > ,
43
+ styleConfig : String as PropType < any > ,
45
44
}
46
45
47
46
type ButtonGroupContext = ( ) => ThemingProps & {
Original file line number Diff line number Diff line change 6
6
ThemingProps ,
7
7
useStyleConfig ,
8
8
} from '@chakra-ui/vue-system'
9
- import { ComponentThemeConfig } from '@chakra-ui/vue-theme'
10
9
import { CVisuallyHidden } from '@chakra-ui/c-visually-hidden'
11
10
12
11
const spin = keyframes ( {
@@ -84,7 +83,7 @@ const props = {
84
83
type : String as PropType < string > ,
85
84
default : 'md' ,
86
85
} ,
87
- styleConfig : String as PropType < ComponentThemeConfig > ,
86
+ styleConfig : String as PropType < any > ,
88
87
}
89
88
90
89
const CSpinner = defineComponent ( {
Original file line number Diff line number Diff line change 1
1
import { Component , Fragment , Suspense , Teleport } from 'vue'
2
2
import { SystemProps , ResponsiveValue } from '@chakra-ui/styled-system'
3
3
4
- import {
5
- ChakraColors ,
6
- ChakraComponentName ,
7
- ComponentThemeConfig ,
8
- } from '@chakra-ui/vue-theme'
9
-
10
4
export type Tag =
11
5
| string
12
6
| typeof Fragment
@@ -19,7 +13,7 @@ export interface ThemingProps {
19
13
size ?: string
20
14
colorScheme ?: string
21
15
orientation ?: 'vertical' | 'horizontal'
22
- styleConfig ?: ComponentThemeConfig
16
+ styleConfig ?: any
23
17
}
24
18
25
19
export interface ChakraProps extends SystemProps {
@@ -52,6 +46,4 @@ export interface ChakraProps extends SystemProps {
52
46
noOfLines ?: ResponsiveValue < number >
53
47
}
54
48
55
- export type ColorScheme = keyof ChakraColors
56
- export type ThemeComponents = ChakraComponentName
57
49
export type { SystemStyleObject } from '@chakra-ui/styled-system'
You can’t perform that action at this time.
0 commit comments