UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

1 lines 944 B
{"version":3,"file":"Section.mjs","names":[],"sources":["../../../src/mdx/mdxComponents/Section.tsx"],"sourcesContent":["'use client';\n\nimport type { FC, ReactNode } from 'react';\n\nimport Footnotes from '@/Markdown/components/Footnotes';\n\ninterface SectionProps {\n 'children': ReactNode;\n 'data-footnotes'?: boolean;\n 'showFootnotes'?: boolean;\n}\n\nconst Section: FC<SectionProps> = ({ children, showFootnotes, ...rest }) => {\n // 说明是脚注\n if (rest['data-footnotes']) {\n if (!showFootnotes) return null;\n return <Footnotes {...rest}>{children}</Footnotes>;\n }\n\n return <section {...rest}>{children}</section>;\n};\n\nSection.displayName = 'MdxSection';\n\nexport default Section;\n"],"mappings":";;;;AAYA,MAAM,WAA6B,EAAE,UAAU,eAAe,GAAG,WAAW;AAE1E,KAAI,KAAK,mBAAmB;AAC1B,MAAI,CAAC,cAAe,QAAO;AAC3B,SAAO,oBAAC,WAAD;GAAW,GAAI;GAAO;GAAqB,CAAA;;AAGpD,QAAO,oBAAC,WAAD;EAAS,GAAI;EAAO;EAAmB,CAAA;;AAGhD,QAAQ,cAAc"}