feat(web): add tooltip for workflow variables

This commit is contained in:
BennyKok
2023-12-21 16:21:32 +08:00
parent 3e55efe0a5
commit c2d67da7db
7 changed files with 114 additions and 55 deletions
+7 -3
View File
@@ -1,10 +1,14 @@
import { CopyButton } from "@/components/CopyButton";
import { getHighlighter, StringLiteralUnion } from 'shikiji'
import type { StringLiteralUnion } from "shikiji";
import { getHighlighter } from "shikiji";
export async function CodeBlock(props: { code: string; lang: StringLiteralUnion<string> }) {
export async function CodeBlock(props: {
code: string;
lang: StringLiteralUnion<string>;
}) {
const highlighter = await getHighlighter({
themes: ["one-dark-pro"],
langs: [props.lang]
langs: [props.lang],
});
return (