File tree Expand file tree Collapse file tree 3 files changed +10
-20
lines changed Expand file tree Collapse file tree 3 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ const nextConfig: NextConfig = {
3232 experimental : {
3333 esmExternals : true ,
3434 workerThreads : false ,
35+ useLightningcss : true ,
3536 } ,
3637} ;
3738
Original file line number Diff line number Diff line change @@ -91,8 +91,8 @@ const THEME = {
9191 } ,
9292 breakpoint : {
9393 maxLayoutWidth : '89rem' ,
94- showQuickNav : '84rem' ,
95- showSideNav : '64rem' ,
94+ showQuickNav : BREAKPOINTS . quickNav ,
95+ showSideNav : BREAKPOINTS . lg ,
9696 } ,
9797 ease : {
9898 out : {
@@ -113,22 +113,6 @@ const THEME = {
113113 '4xl' : '2rem' ,
114114 } ,
115115 $$breakpoints : BREAKPOINT_UTILS ,
116- $$utils : {
117- apply ( key : string , value : unknown ) {
118- const ctx = this as unknown as Theme ;
119- // @ts -expect-error Not typing explicitly to avoid circular typing
120- const val = ctx [ key ] [ value ] as Theme [ 'text' ] [ 'md' ] ;
121- return {
122- fontSize : val . default ,
123- lineHeight : val . lineHeight ,
124- letterSpacing : val . letterSpacing ,
125- } ;
126- } ,
127- spacing ( number : string | number ) {
128- const ctx = this as unknown as Theme ;
129- return `calc(${ ctx . spacing } * ${ number } )` ;
130- } ,
131- } ,
132116} ;
133117
134118export type Theme = typeof THEME ;
Original file line number Diff line number Diff line change 11import type { Theme } from '@pigment-css/theme' ;
22
33export function applyText ( theme : Theme , value : keyof Theme [ 'text' ] ) {
4- return theme . $$utils . apply . call ( theme , 'text' , value ) ;
4+ const val = theme . text [ value ] ;
5+ return {
6+ fontSize : val . default ,
7+ lineHeight : val . lineHeight ,
8+ letterSpacing : val . letterSpacing ,
9+ } ;
510}
611
712export function spacing ( theme : Theme , space : number | string ) {
8- return theme . $$utils . spacing . call ( theme , space ) ;
13+ return `calc( ${ theme . spacing } * ${ space } )` ;
914}
You can’t perform that action at this time.
0 commit comments