Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Nov 5, 2024
1 parent e46ebf9 commit da1c2fe
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions src/frontend/src/components/codeTabsComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import ShadTooltip from "@/components/shadTooltipComponent";
import { useTweaksStore } from "@/stores/tweaksStore";
import { useState } from "react";
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
import { tomorrow, oneDark } from "react-syntax-highlighter/dist/cjs/styles/prism";
import {
oneDark,
tomorrow,
} from "react-syntax-highlighter/dist/cjs/styles/prism";
import {
Tabs,
TabsContent,
Expand Down Expand Up @@ -84,14 +87,14 @@ export default function CodeTabsComponent({
key={idx} // Remember to add a unique key prop
>
{tab.name.toLowerCase() !== "tweaks" ? (
<div className="flex h-full w-full flex-col mt-2">
<div className="mt-2 flex h-full w-full flex-col">
{tab.description && (
<div
className="mb-2 w-full text-left text-sm"
dangerouslySetInnerHTML={{ __html: tab.description }}
></div>
)}
<div className="flex w-full items-center justify-end gap-4 rounded-t-md border border-input border-b-0 bg-secondary px-4 py-2">
<div className="flex w-full items-center justify-end gap-4 rounded-t-md border border-b-0 border-input bg-secondary px-4 py-2">
{nodes.length > 0 &&
tabs.find((tab) => tab.name.toLowerCase() === "tweaks") &&
tabs[activeTab].hasTweaks && (
Expand Down Expand Up @@ -119,9 +122,7 @@ export default function CodeTabsComponent({
checked={activeTweaks}
autoFocus={false}
/>
<span className="text-lg text-accent">
|
</span>
<span className="text-lg text-accent">|</span>
</div>
)}

Expand All @@ -134,9 +135,15 @@ export default function CodeTabsComponent({
data-testid="btn-copy-code"
>
{isCopied ? (
<IconComponent name="Check" className="h-4 w-4 text-muted-foreground" />
<IconComponent
name="Check"
className="h-4 w-4 text-muted-foreground"
/>
) : (
<IconComponent name="Copy" className="h-4 w-4 text-muted-foreground" />
<IconComponent
name="Copy"
className="h-4 w-4 text-muted-foreground"
/>
)}
</Button>
</>
Expand All @@ -145,7 +152,7 @@ export default function CodeTabsComponent({
<SyntaxHighlighter
language={tab.language}
style={oneDark}
className="!my-0 h-full overflow-auto rounded-sm !rounded-t-none bg-code-block border border-input border-t-0 text-left custom-scroll"
className="!my-0 h-full overflow-auto rounded-sm !rounded-t-none border border-t-0 border-input bg-code-block text-left custom-scroll"
>
{tab.code}
</SyntaxHighlighter>
Expand Down

0 comments on commit da1c2fe

Please sign in to comment.