feat: show language name (#113)
This commit is contained in:
parent
ad2e1f0d4c
commit
bc3b6d3355
|
@ -49,19 +49,22 @@ export const CodeBlock: FC<Props> = ({ language, value, lightMode }) => {
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<div className="relative text-[16px]">
|
<div className="relative text-[16px]">
|
||||||
<div className="flex items-center justify-end">
|
<div className="flex items-center justify-between">
|
||||||
<button
|
<span className="text-xs text-white">{language}</span>
|
||||||
className="text-white bg-none py-0.5 px-2 rounded focus:outline-none hover:bg-blue-700 text-xs"
|
<div className="flex items-center">
|
||||||
onClick={copyToClipboard}
|
<button
|
||||||
>
|
className="text-white bg-none py-0.5 px-2 rounded focus:outline-none hover:bg-blue-700 text-xs"
|
||||||
{buttonText}
|
onClick={copyToClipboard}
|
||||||
</button>
|
>
|
||||||
<button
|
{buttonText}
|
||||||
className="text-white bg-none py-0.5 px-2 rounded focus:outline-none hover:bg-blue-700 text-xs"
|
</button>
|
||||||
onClick={downloadAsFile}
|
<button
|
||||||
>
|
className="text-white bg-none py-0.5 px-2 rounded focus:outline-none hover:bg-blue-700 text-xs"
|
||||||
<IconDownload size={16} />
|
onClick={downloadAsFile}
|
||||||
</button>
|
>
|
||||||
|
<IconDownload size={16} />
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<SyntaxHighlighter
|
<SyntaxHighlighter
|
||||||
|
|
Loading…
Reference in New Issue