SurfSense/surfsense_web/components/ui/code-node-static.tsx

18 lines
399 B
TypeScript
Raw Normal View History

import * as React from 'react';
import type { SlateLeafProps } from 'platejs/static';
import { SlateLeaf } from 'platejs/static';
export function CodeLeafStatic(props: SlateLeafProps) {
return (
<SlateLeaf
{...props}
as="code"
className="whitespace-pre-wrap rounded-md bg-muted px-[0.3em] py-[0.2em] font-mono text-sm"
>
{props.children}
</SlateLeaf>
);
}