Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 15ed202

Browse files
committed
feat: add type of Chakra
1 parent 2f190b3 commit 15ed202

File tree

3 files changed

+37
-31
lines changed

3 files changed

+37
-31
lines changed

packages/chakra-ui-core/src/Chakra/index.js

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,9 @@ import { createClientDirective } from '../directives'
66
import defaultTheme from '../../../chakra-ui-theme/src'
77
import useToast from '../CToast'
88

9-
/**
10-
* @typedef {Object} Theme Chakra UI Theme object
11-
* @property {Object} breakpoints
12-
* @property {Object} zIndices
13-
* @property {Object} radii
14-
* @property {Object} opacity
15-
* @property {Object} borders
16-
* @property {Object} colors
17-
* @property {Object} borderWidths
18-
* @property {Object} sizes
19-
* @property {Object} shadows
20-
* @property {Object} space
21-
* @property {Object} fontSizes
22-
* @property {Object} fonts
23-
* @property {Object} fontWeights
24-
* @property {Object} lineHeights
25-
* @property {Object} letterSpacings
26-
*/
27-
28-
/**
29-
* @typedef {Object} Options
30-
* @property {Theme} theme
31-
* @property {Theme} extendTheme
32-
* @property {Object} icons
33-
* @property {Object} icons.extend
34-
* @property {String} icons.iconPack
35-
* @property {Object} icons.iconSet
36-
*
37-
*/
38-
399
/**
4010
* Chakra-ui Component library plugin
41-
* @type {Chakra}
11+
* @type {import("../../types").default}
4212
*/
4313
const Chakra = {
4414
/**
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { PluginObject } from "vue"
2+
3+
export type Theme = {
4+
breakpoints: any
5+
zIndices: any
6+
radii: any
7+
opacity: any
8+
borders: any
9+
colors: any
10+
borderWidths: any
11+
sizes: any
12+
shadows: any
13+
space: any
14+
fontSizes: any
15+
fonts: any
16+
fontWeights: any
17+
lineHeights: any
18+
letterSpacings: any
19+
}
20+
21+
export type Options = {
22+
theme: Theme
23+
extendTheme: Theme
24+
icons: {
25+
extend: any
26+
iconPack: string
27+
iconSet: any
28+
}
29+
}
30+
31+
type Chakra = PluginObject<Options>
32+
33+
export default Chakra
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
import './component'
2+
import Chakra from "./chakra"
3+
4+
export default Chakra

0 commit comments

Comments
 (0)