FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
devrd.github.io/components/post-body.tsx at main · devRD/devrd.github.io · GitHub
devRD
devrd.github.io
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
devrd.github.io
/
components
/
post-body.tsx
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (34 loc) · 860 Bytes
Breadcrumbs
devrd.github.io
/
components
/
post-body.tsx
Copy path
File metadata and controls
38 lines (34 loc) · 860 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import
markdownStyles
from
'@styles/markdown-styles.module.css'
import
ReactMarkdown
from
'react-markdown'
import
rehypeRaw
from
"rehype-raw"
;
import
Image
from
'next/image'
import
{
Waterfall
,
Unna
}
from
'next/font/google'
type
Props
=
{
content
:
string
}
const
unna
=
Unna
(
{
subsets
:
[
]
,
weight
:
[
"400"
,
"700"
]
,
preload
:
true
}
)
const
PostBody
=
(
{
content
}
:
Props
)
=>
{
return
(
<
ReactMarkdown
children
=
{
content
}
rehypePlugins
=
{
[
rehypeRaw
]
}
className
=
{
`
${
unna
.
className
}
${
markdownStyles
.
markdown
}
`
}
components
=
{
{
img
:
(
props
)
=>
(
<
Image
src
=
{
props
.
src
!
}
alt
=
{
props
.
alt
!
}
width
=
{
Number
(
props
.
width
)
}
height
=
{
Number
(
props
.
height
)
}
className
=
"p-2 position-relative"
/>
)
,
}
}
/>
)
}
export
default
PostBody
Back
|
FazBrowse Home
|
New Git URL