@@ -27,21 +27,21 @@ const { tokens: defaultTokens } = tokenize.html(`<div class="flex pa-2 bg-white
2727export function CodeWindow ( { children, lineNumbersBackground = true , className = '' } ) {
2828 return (
2929 < div
30- className = { `relative overflow-hidden md:rounded-xl shadow-2xl flex ${ styles . root } ${ className } ` }
30+ className = { `relative flex overflow-hidden shadow-2xl md:rounded-xl ${ styles . root } ${ className } ` }
3131 >
3232 < div className = "absolute inset-0 bg-black bg-opacity-75" />
33- < div className = "relative w-full flex flex-col" >
34- < div className = "flex-none h-11 flex items-center px-4" >
33+ < div className = "relative flex w-full flex-col" >
34+ < div className = "flex h-11 flex-none items-center px-4" >
3535 < div className = "flex space-x-1.5" >
36- < div className = "w -3 h -3 border-2 rounded-full border-red-500" />
37- < div className = "w -3 h -3 border-2 rounded-full border-amber-400" />
38- < div className = "w -3 h -3 border-2 rounded-full border-green-400" />
36+ < div className = "h -3 w -3 rounded-full border-2 border-red-500" />
37+ < div className = "h -3 w -3 rounded-full border-2 border-amber-400" />
38+ < div className = "h -3 w -3 rounded-full border-2 border-green-400" />
3939 </ div >
4040 </ div >
41- < div className = "relative border-t border-white border-opacity-10 min-h-0 flex-auto flex flex -col" >
41+ < div className = "relative flex min-h-0 flex-auto flex-col border-t border-white border-opacity-10 " >
4242 { lineNumbersBackground && (
4343 < div
44- className = "hidden md:block absolute inset-y-0 left-0 bg-black bg-opacity-25"
44+ className = "absolute inset-y-0 left-0 hidden bg-black bg-opacity-25 md:block "
4545 style = { { width : 50 } }
4646 />
4747 ) }
@@ -71,17 +71,17 @@ CodeWindow.Code = forwardRef(({ tokens = defaultTokens, initialLineNumber = 1, .
7171 } , [ tokens ] )
7272
7373 return (
74- < div className = "w-full flex-auto flex min-h-0 overflow-auto" >
75- < div ref = { ref } className = "w-full relative flex-auto" >
74+ < div className = "flex min-h-0 w-full flex-auto overflow-auto" >
75+ < div ref = { ref } className = "relative w-full flex-auto" >
7676 < pre className = "flex min-h-full text-xs md:text-sm" >
7777 < div
7878 aria-hidden = "true"
79- className = "hidden md:block text-white text-opacity-50 flex- none py-4 pr-4 text-right select-none "
79+ className = "hidden flex-none select- none py-4 pr-4 text-right text-white text-opacity-50 md:block "
8080 style = { { width : 50 } }
8181 >
8282 { lineNumbers }
8383 </ div >
84- < code className = "flex-auto relative block text-white pt-4 pb-4 px-4 overflow-auto " >
84+ < code className = "relative block flex-auto overflow-auto px-4 pt-4 pb-4 text-white " >
8585 < Code tokens = { tokens } { ...props } />
8686 </ code >
8787 </ pre >
@@ -103,15 +103,15 @@ CodeWindow.Code2 = forwardRef(
103103 return (
104104 < div
105105 ref = { ref }
106- className = { clsx ( className , 'w-full flex-auto flex min-h-0' , {
106+ className = { clsx ( className , 'flex min-h-0 w-full flex-auto ' , {
107107 'overflow-auto' : overflow === true || overflow === 'y' ,
108108 } ) }
109109 >
110- < div className = "w-full relative flex-auto" >
110+ < div className = "relative w-full flex-auto" >
111111 < pre className = "flex min-h-full text-xs md:text-sm" >
112112 < div
113113 aria-hidden = "true"
114- className = "hidden md:block text-white text-opacity-50 flex- none py-4 pr-4 text-right select-none "
114+ className = "hidden flex-none select- none py-4 pr-4 text-right text-white text-opacity-50 md:block "
115115 style = { { width : 50 } }
116116 >
117117 { Array . from ( { length : lines } ) . map ( ( _ , i ) =>
@@ -126,7 +126,7 @@ CodeWindow.Code2 = forwardRef(
126126 ) }
127127 </ div >
128128 < code
129- className = { clsx ( 'flex-auto relative block text-white pt-4 pb-4 px-4 ' , {
129+ className = { clsx ( 'relative block flex-auto px-4 pt-4 pb-4 text-white ' , {
130130 'overflow-auto' : overflow === true || overflow === 'x' ,
131131 } ) }
132132 >
0 commit comments