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

refactor component/page function returns

This commit is contained in:
2022-05-25 09:30:11 -04:00
parent ff96ccae44
commit 1e1ecd89ea
31 changed files with 2347 additions and 2281 deletions

View File

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