File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -16,19 +16,19 @@ type ThemeImport = { styles: CSSResult };
16
16
const themes = import . meta. glob < ThemeImport > (
17
17
'../src/styles/themes/**/*.css.ts' ,
18
18
{
19
- query : '?inline' ,
19
+ eager : true ,
20
+ import : 'styles' ,
20
21
}
21
22
) ;
22
23
23
- const getTheme = async ( { theme, variant } ) => {
24
+ const getTheme = ( { theme, variant } ) => {
24
25
const matcher = `../src/styles/themes/${ variant } /${ theme } .css.ts` ;
25
26
26
- const [ _ , resolver ] = Object . entries ( themes ) . find ( ( [ path ] ) => {
27
- return path . match ( matcher ) ;
28
- } ) ! ;
29
-
30
- const stylesheet = await resolver ( ) ;
31
- return stylesheet . styles . toString ( ) ;
27
+ for ( const [ path , styles ] of Object . entries ( themes ) ) {
28
+ if ( path === matcher ) {
29
+ return styles ;
30
+ }
31
+ }
32
32
} ;
33
33
34
34
const getSize = ( size : 'small' | 'medium' | 'large' | 'default' ) => {
You can’t perform that action at this time.
0 commit comments