Skip to content

Commit 70de6a1

Browse files
committed
fix(lint): resolve code lint
1 parent e046b58 commit 70de6a1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/bubble/markdown.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import clsx from "clsx";
22
import { useCallback, useState } from "react";
33
import SyntaxHighlighter from "react-syntax-highlighter";
4-
import { useTheme } from "./hooks";
54
import {
65
oneLight,
76
vscDarkPlus,
87
} from "react-syntax-highlighter/dist/esm/styles/prism";
8+
import { useTheme } from "./hooks";
99

1010
export interface HeadingProps extends React.ComponentProps<"h1"> {
1111
level: 1 | 2 | 3 | 4 | 5 | 6;
@@ -51,19 +51,20 @@ export function CodeBlock({
5151
<div
5252
className={clsx(
5353
"w-full overflow-x-auto rounded-lg",
54-
"bg-gray-50 dark:bg-gray-800"
54+
"bg-gray-50 dark:bg-gray-800",
5555
)}
5656
>
5757
<div className="inline-flex w-full justify-between bg-gray-100 p-2">
5858
<div className="px-2 py-1 text-xs text-gray-900 dark:text-gray-400">
5959
{match[1]}
6060
</div>
61-
<div
61+
<button
62+
type="button"
6263
className="px-2 py-1 text-xs text-gray-900 dark:text-gray-400 cursor-pointer"
6364
onClick={handleCopy}
6465
>
6566
{copied ? "Copied" : "Copy"}
66-
</div>
67+
</button>
6768
</div>
6869
<SyntaxHighlighter
6970
{...rest}
@@ -92,7 +93,7 @@ export function CodeBlock({
9293
{...rest}
9394
className={clsx(
9495
"rounded-md px-1 py-0.5 text-[85%]",
95-
"bg-gray-100 dark:bg-gray-800"
96+
"bg-gray-100 dark:bg-gray-800",
9697
)}
9798
>
9899
{children}
@@ -120,7 +121,7 @@ export function Link({ children, className, ...rest }: LinkProps) {
120121
<a
121122
className={clsx(
122123
"text-blue-600 dark:text-blue-400 hover:underline underline-offset-1",
123-
className
124+
className,
124125
)}
125126
target="_blank"
126127
{...rest}

0 commit comments

Comments
 (0)