-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
372 additions
and
928 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
import type { MDXRemoteProps } from "next-mdx-remote/rsc"; | ||
import { Pre } from "./Pre"; | ||
import { withPaperClipAnchor } from "./withPaperClipAnchor"; | ||
|
||
type TComponents = MDXRemoteProps["components"]; | ||
|
||
const index: TComponents = { | ||
pre: Pre, | ||
h1: (props) => { | ||
return <h1 className="font-bol devd text-4xl" {...props} />; | ||
}, | ||
}; | ||
|
||
export default index; |
16 changes: 16 additions & 0 deletions
16
src/components/mdPreview/components/withPaperClipAnchor.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"use client"; | ||
|
||
import { PaperclipIcon } from "lucide-react"; | ||
|
||
export function withPaperClipAnchor<P extends JSX.IntrinsicAttributes>( | ||
Component: React.ComponentType<P>, | ||
) { | ||
return function WithPaperClipAnchor(props: P) { | ||
return ( | ||
<div className="flex gap-[4px]"> | ||
<PaperclipIcon /> | ||
<Component {...props} /> | ||
</div> | ||
); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.