docs: added troubleshooting component (#4255)

This commit is contained in:
Shahed Nasser
2023-06-06 15:18:23 +03:00
committed by GitHub
parent 926e284bac
commit b1c63c5476
64 changed files with 607 additions and 257 deletions

View 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