File tree Expand file tree Collapse file tree
docs/src/design/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { ReactNode } from 'react' ;
1+ import { PropsWithChildren } from 'react' ;
22
3- import { Sheet , SheetProps } from '@mui/joy' ;
4-
5- interface ICodeblockProps extends SheetProps {
6- children : ReactNode ;
7- }
8-
9- export default function Codeblock ( { children, ...props } : ICodeblockProps ) {
3+ export default function Codeblock ( { children, ...props } : PropsWithChildren ) {
104 return (
11- < Sheet
12- variant = "outlined"
13- color = "primary"
14- component = "pre"
15- sx = { {
16- fontSize : 'sm' ,
17- fontFamily : 'code' ,
18- p : 1 ,
19- m : 0 ,
20- borderRadius : 'sm' ,
21- backgroundColor : 'rgba(var(--joy-palette-primary-mainChannel) / .1)'
22- } }
23- { ...props }
24- >
5+ < pre className = "rounded-sm border border-indigo-200 bg-indigo-100 px-2 py-1.5 font-mono text-sm text-indigo-600" { ...props } >
256 < code > { children } </ code >
26- </ Sheet >
7+ </ pre >
278 ) ;
289}
You can’t perform that action at this time.
0 commit comments