Skip to content

Commit a89cc66

Browse files
committed
feat: use new types of style-dictionary
1 parent 513c20f commit a89cc66

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/types.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import type { Dictionary } from 'style-dictionary/types/Dictionary'
2-
import type { Platform } from 'style-dictionary/types/Platform'
3-
import type { Config } from 'style-dictionary/types/Config'
1+
import { Dictionary } from 'style-dictionary/types/DesignToken'
2+
import type { Config, PlatformConfig } from 'style-dictionary/types/Config'
43
import type { Config as TailwindConfig } from 'tailwindcss/types'
54

65
export type SdObjType<T extends Record<string, any>> = {
@@ -9,7 +8,13 @@ export type SdObjType<T extends Record<string, any>> = {
98

109
export type TailwindOptions = Pick<TailwindConfig, 'content' | 'darkMode'> & {
1110
plugins: Array<
12-
'typography' | ['typography', { className?: string, target?: 'modern' | 'legacy' }] | 'forms' | ['forms', { strategy?: 'base' | 'class' }] | 'aspect-ratio' | 'line-clamp' | 'container-queries'
11+
| 'typography'
12+
| ['typography', { className?: string; target?: 'modern' | 'legacy' }]
13+
| 'forms'
14+
| ['forms', { strategy?: 'base' | 'class' }]
15+
| 'aspect-ratio'
16+
| 'line-clamp'
17+
| 'container-queries'
1318
>
1419
}
1520
export type TailwindFormatType = 'js' | 'cjs'
@@ -19,9 +24,9 @@ export type SdTailwindConfigType = {
1924
formatType?: TailwindFormatType
2025
isVariables?: boolean
2126
source?: Config['source']
22-
transforms?: Platform['transforms']
23-
buildPath?: Platform['buildPath']
24-
prefix?: Platform['prefix']
27+
transforms?: PlatformConfig['transforms']
28+
buildPath?: PlatformConfig['buildPath']
29+
prefix?: PlatformConfig['prefix']
2530
tailwind?: Partial<TailwindOptions>
2631
extend?: boolean
2732
}

0 commit comments

Comments
 (0)