Skip to content

Commit

Permalink
feat: adjust the position of copy tips
Browse files Browse the repository at this point in the history
  • Loading branch information
longxiaofei committed Jun 19, 2024
1 parent e477ca0 commit 78bf770
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/src/components/codeExportModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ const CodeExport: React.FC<ICodeExport> = observer((props) => {
<TabsTrigger value="python">Python</TabsTrigger>
<TabsTrigger value="json">JSON(Graphic Walker)</TabsTrigger>
</TabsList>
<div className="text-xs max-h-56 mt-2">
<p>{tips}</p>
</div>
<TabsContent className="py-4" value="python">
<h3 className="text-sm font-medium mb-2">PyGWalker Code</h3>
<SyntaxHighlighter showLineNumbers language="python" style={darkMode === 'dark' ? atomOneDark : atomOneLight}>
{pyCode}
</SyntaxHighlighter>
<div className="text-xs max-h-56 mt-2">
<p>{tips}</p>
</div>
<div className="mt-4 flex justify-start gap-2">
<Button
onClick={() => {
Expand All @@ -105,6 +105,9 @@ const CodeExport: React.FC<ICodeExport> = observer((props) => {
<SyntaxHighlighter showLineNumbers language="json" style={darkMode === 'dark' ? atomOneDark : atomOneLight}>
{JSON.stringify(visSpec, null, 2)}
</SyntaxHighlighter>
<div className="text-xs max-h-56 mt-2">
<p>{tips}</p>
</div>
<div className="mt-4 flex justify-start gap-2">
<Button
onClick={() => {
Expand Down

0 comments on commit 78bf770

Please # to comment.