@@ -44,9 +44,11 @@ function CodeEditorDefault({
4444 type,
4545 content = '' ,
4646 children,
47+ className,
4748} : {
4849 type : FileExtensions
4950 content : string
51+ className ?: string
5052 children : ( options : {
5153 extensions : Extension [ ]
5254 content : string
@@ -65,7 +67,7 @@ function CodeEditorDefault({
6567 } , [ type , mode ] )
6668
6769 return (
68- < div className = " flex overflow-auto h-full" >
70+ < div className = { clsx ( ' flex w-full h-full' , className ) } >
6971 { children ( { extensions, content } ) }
7072 </ div >
7173 )
@@ -75,9 +77,11 @@ function CodeEditorSQLMesh({
7577 type,
7678 content = '' ,
7779 children,
80+ className,
7881} : {
7982 type : FileExtensions
8083 content ?: string
84+ className ?: string
8185 children : ( options : {
8286 extensions : Extension [ ]
8387 content : string
@@ -110,7 +114,6 @@ function CodeEditorSQLMesh({
110114
111115 const extensions = useMemo ( ( ) => {
112116 return [
113- mode === EnumColorScheme . Dark ? dracula : tomorrow ,
114117 mode === EnumColorScheme . Dark ? dracula : tomorrow ,
115118 type === EnumFileExtensions . Python && python ( ) ,
116119 type === EnumFileExtensions . YAML && StreamLanguage . define ( yaml ) ,
@@ -140,7 +143,7 @@ function CodeEditorSQLMesh({
140143 } , [ content ] )
141144
142145 return (
143- < div className = " flex overflow-auto h-full" >
146+ < div className = { clsx ( ' flex w-full h-full' , className ) } >
144147 { children ( { extensions, content } ) }
145148 </ div >
146149 )
@@ -214,9 +217,7 @@ export function useSQLMeshModelExtensions(
214217 const files = useStoreFileTree ( s => s . files )
215218
216219 const extensions = useMemo ( ( ) => {
217- if ( path == null ) return [ ]
218-
219- const model = models . get ( path )
220+ const model = path == null ? undefined : models . get ( path )
220221 const columns =
221222 lineage == null
222223 ? new Set < string > ( )
0 commit comments