feat: Wrap the searched chunk with a Popover #2247 (#2398)

### What problem does this PR solve?

feat: Wrap the searched chunk with a Popover #2247

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-09-12 19:15:44 +08:00
committed by GitHub
parent cfae63d107
commit db0606e064
8 changed files with 39 additions and 8 deletions

View File

@ -1,3 +1,4 @@
import classNames from 'classnames';
import Markdown from 'react-markdown';
import SyntaxHighlighter from 'react-syntax-highlighter';
import rehypeRaw from 'rehype-raw';
@ -7,14 +8,16 @@ import styles from './index.less';
const HightLightMarkdown = ({
children,
className,
}: {
children: string | null | undefined;
className?: string;
}) => {
return (
<Markdown
remarkPlugins={[remarkGfm]}
rehypePlugins={[rehypeRaw]}
className={styles.text}
className={classNames(styles.text, className)}
components={
{
code(props: any) {