docs: added troubleshooting component (#4255)
This commit is contained in:
25
www/docs/src/components/Troubleshooting/index.tsx
Normal file
25
www/docs/src/components/Troubleshooting/index.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import React from "react"
|
||||
import Details from "@theme/Details"
|
||||
|
||||
type TroubleshootingSection = {
|
||||
title: string
|
||||
content: React.ReactNode
|
||||
}
|
||||
|
||||
type TroubleshootingProps = {
|
||||
sections: TroubleshootingSection[]
|
||||
} & React.AllHTMLAttributes<HTMLDivElement>
|
||||
|
||||
const Troubleshooting: React.FC<TroubleshootingProps> = ({ sections }) => {
|
||||
return (
|
||||
<>
|
||||
{sections.map(({ title, content }, index) => (
|
||||
<Details summary={title} key={index}>
|
||||
{content}
|
||||
</Details>
|
||||
))}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default Troubleshooting
|
||||
Reference in New Issue
Block a user