|
1 | 1 | import { FileCode, Loader2, Plus, Trash2 } from 'lucide-react'; |
2 | 2 | import { useEffect, useId, useRef, useState } from 'react'; |
3 | 3 | import { Button } from '@/components/ui/button'; |
| 4 | +import { CodeBlock } from '@/components/ui/code-block'; |
4 | 5 | import { ConfirmDialog } from '@/components/ui/confirm-dialog'; |
5 | 6 | import { Input } from '@/components/ui/input'; |
6 | 7 | import { |
@@ -483,15 +484,22 @@ export const PixiTomlEditor = ({ |
483 | 484 | > |
484 | 485 | pixi.toml Configuration |
485 | 486 | </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> |
495 | 503 | <p className="text-xs text-muted-foreground"> |
496 | 504 | Define your project dependencies and configuration in TOML format |
497 | 505 | </p> |
|
0 commit comments