pluginComment
HTML にコメントを出力するプラグイン。
Table of Contents
How To Use
import { pluginComment } from "minista"
export default {
plugins: [pluginComment()],
}import { Comment } from "minista/assets"
export default function () {
return <Comment text="Outputting comments in react jsx" />
}Options
※オプションはありません
Comment
HTML にコメントを出力するコンポーネント。
import { Comment } from "minista/assets"
export default function () {
return (
<>
<Comment text="+ comment" />
<h1>index</h1>
<Comment text="- comment" />
</>
)
}<!-- + comment -->
<h1>index</h1>
<!-- - comment -->type CommentProps = CommentUseContent | CommentUseChildren
type CommentUseContent = {
text: string
children?: string
}
type CommentUseChildren = {
text?: string
children: string
}