File size: 490 Bytes
d378496
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { styled } from "@mui/material/styles";
import { Paper, PaperProps } from "@mui/material";

type CodeProps = {
  children: string;
};

const CodeBox = styled(Paper)<PaperProps>(({ theme }) => ({
  fontFamily: "monospace",
  padding: 8,
  borderTop: `2px solid ${theme.palette.secondary.dark}`,
  borderBottom: `2px solid ${theme.palette.secondary.dark}`,
}));

export default function Code(props: CodeProps) {
  const { children } = props;

  return <CodeBox>{children}</CodeBox>;
}