this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

editor: fix size

Clément d015630f c191b8b4

+16 -6
+11 -1
app/src/lib/components/Editor.tsx
··· 6 6 7 7 type Props = { initialValue?: string } & JSX.HTMLAttributes<HTMLDivElement>; 8 8 9 + const fillHeightTheme = EditorView.theme({ 10 + '&': { 11 + height: '100%', 12 + fontSize: '14px', 13 + }, 14 + '.cm-scroller': { 15 + overflow: 'auto', 16 + }, 17 + }); 18 + 9 19 export function Editor(props: Props) { 10 20 let ref: HTMLDivElement; 11 21 let view: EditorView | null; ··· 13 23 onMount(() => { 14 24 view = new EditorView({ 15 25 doc: props.initialValue, 16 - extensions: [lineNumbers(), oneDark, python()], 26 + extensions: [lineNumbers(), oneDark, fillHeightTheme, python()], 17 27 parent: ref!, 18 28 }); 19 29 });
+1 -1
app/src/routes/__root.tsx
··· 32 32 <meta name="viewport" content="width=device-width, initial-scale=1" /> 33 33 <HydrationScript /> 34 34 </head> 35 - <body class="bg-background text-text font-mono"> 35 + <body class="bg-background text-text font-mono h-screen flex flex-col"> 36 36 <HeadContent /> 37 37 <Suspense> 38 38 <AuthProvider>
+4 -4
app/src/routes/index.tsx
··· 21 21 22 22 function RouteComponent() { 23 23 return ( 24 - <div class="flex flex-row"> 25 - <Editor class="flex-1" initialValue={BASE_CODE} /> 26 - <RealtimeScoreboard class="w-1/2 p-2" /> 27 - </div> 24 + <main class="flex h-full flex-row overflow-hidden"> 25 + <Editor class="flex-1 overflow-hidden" initialValue={BASE_CODE} /> 26 + <RealtimeScoreboard class="w-1/2 overflow-auto p-2" /> 27 + </main> 28 28 ); 29 29 }