温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/bun/markdown/ComponentOverrides
点击访问原文链接

interface ComponentOverrides | Bun module | Bun

interface ComponentOverrides | Bun module | BunBuildDocsReferenceGuidesBlogDiscord/Bun/markdown/ComponentOverridesPaPblockquotePbrPcodePdelPemPh1Ph2Ph3Ph4Ph5Ph6PhrPhtmlPimgPliPmathPolPpPprePstrongPtablePtbodyPtdPthPtheadPtrPuPul

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/Bun/markdown/ComponentOverridesPaPblockquotePbrPcodePdelPemPh1Ph2Ph3Ph4Ph5Ph6PhrPhtmlPimgPliPmathPolPpPprePstrongPtablePtbodyPtdPthPtheadPtrPuPul

interface

markdown.ComponentOverridesinterface ComponentOverrides

Component overrides for react().

Replace default HTML tags with custom React components. Each override receives the same props the default element would get.

function Code({ language, children }: { language?: string; children: React.ReactNode }) {
return pre data-language={language}>code>{children}code>pre>;
}
Bun.markdown.react(text, { pre: Code });
a?: ComponentLinkProps>blockquote?: ComponentChildrenProps>br?: Component{}>code?: ComponentChildrenProps>del?: ComponentChildrenProps>em?: ComponentChildrenProps>h1?: ComponentHeadingProps>h2?: ComponentHeadingProps>h3?: ComponentHeadingProps>h4?: ComponentHeadingProps>h5?: ComponentHeadingProps>h6?: ComponentHeadingProps>hr?: Component{}>html?: ComponentChildrenProps>img?: ComponentImageProps>li?: ComponentListItemProps>math?: ComponentChildrenProps>ol?: ComponentOrderedListProps>p?: ComponentChildrenProps>pre?: ComponentCodeBlockProps>strong?: ComponentChildrenProps>table?: ComponentChildrenProps>tbody?: ComponentChildrenProps>td?: ComponentCellProps>th?: ComponentCellProps>thead?: ComponentChildrenProps>tr?: ComponentChildrenProps>u?: ComponentChildrenProps>ul?: ComponentChildrenProps>

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicense

Baked with ❤️ in San Francisco

We're hiring →

interface ComponentOverrides | Bun module | Bun,AI智能索引,全网链接索引,智能导航,网页索引

    Component overrides for `react()`. Replace default HTML tags with custom React components. Each override receives the same props the default element would get.