1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 07:01:19 -04:00

enable vercel analytics

This commit is contained in:
2023-06-17 20:14:43 -04:00
parent cab79559e6
commit afbdcc7b06
23 changed files with 3046 additions and 2049 deletions

View File

@@ -89,12 +89,13 @@ const CornerCopyButton = styled(CopyButton, {
export type CodeBlockProps = ComponentProps<typeof Code> & {
highlight?: boolean;
withCopyButton?: boolean;
};
const CodeBlock = ({ highlight, className, children, ...rest }: CodeBlockProps) => {
const CodeBlock = ({ highlight, withCopyButton, className, children, ...rest }: CodeBlockProps) => {
return (
<Block highlight={highlight}>
<CornerCopyButton source={children} />
{withCopyButton && <CornerCopyButton source={children} />}
<Code className={className?.replace("code-highlight", "").trim()} {...rest}>
{children}
</Code>