File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 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 };
1616const themes = import . meta. glob < ThemeImport > (
1717 '../src/styles/themes/**/*.css.ts' ,
1818 {
19- query : '?inline' ,
19+ eager : true ,
20+ import : 'styles' ,
2021 }
2122) ;
2223
23- const getTheme = async ( { theme, variant } ) => {
24+ const getTheme = ( { theme, variant } ) => {
2425 const matcher = `../src/styles/themes/${ variant } /${ theme } .css.ts` ;
2526
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+ }
3232} ;
3333
3434const getSize = ( size : 'small' | 'medium' | 'large' | 'default' ) => {
You can’t perform that action at this time.
0 commit comments