Skip to content

Commit 0aaa6ba

Browse files
jbouderclaude
andcommitted
Frame the TOML editor with the Nebari code block
Wrap PixiTomlEditor's TOML-mode textarea in the CodeBlock frame (dark-forced card surface with the floating copy button) so the editable view matches the read-only pixi.toml code block. Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent 660c772 commit 0aaa6ba

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

‎frontend/src/components/workspace/PixiTomlEditor.tsx‎

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { FileCode, Loader2, Plus, Trash2 } from 'lucide-react';
22
import { useEffect, useId, useRef, useState } from 'react';
33
import { Button } from '@/components/ui/button';
4+
import { CodeBlock } from '@/components/ui/code-block';
45
import { ConfirmDialog } from '@/components/ui/confirm-dialog';
56
import { Input } from '@/components/ui/input';
67
import {
@@ -483,15 +484,22 @@ export const PixiTomlEditor = ({
483484
>
484485
pixi.toml Configuration
485486
</label>
486-
<Textarea
487-
id={tomlEditorId}
488-
placeholder="Enter your pixi.toml content"
489-
value={tomlValue}
490-
onChange={(e) => handleTomlEdit(e.target.value)}
491-
rows={12}
492-
required
493-
className="font-mono text-sm"
494-
/>
487+
{/* Reuse the Nebari CodeBlock frame (dark-forced subtree, card
488+
surface, floating copy button) around the editable textarea so
489+
TOML mode matches the read-only pixi.toml view on the workspace
490+
detail page. `pr-12` mirrors CodeBlockBody's clearance for the
491+
floating copy button. */}
492+
<CodeBlock dark code={tomlValue} className="w-full">
493+
<Textarea
494+
id={tomlEditorId}
495+
placeholder="Enter your pixi.toml content"
496+
value={tomlValue}
497+
onChange={(e) => handleTomlEdit(e.target.value)}
498+
rows={12}
499+
required
500+
className="rounded-none border-0 bg-transparent px-4 py-4 pr-12 font-mono text-sm leading-relaxed focus-visible:ring-inset"
501+
/>
502+
</CodeBlock>
495503
<p className="text-xs text-muted-foreground">
496504
Define your project dependencies and configuration in TOML format
497505
</p>

0 commit comments

Comments
 (0)