docs: generate documentation for UI components (#5849)
* added tool to generate spec files for React components * use typedoc for missing descriptions and types * improvements and fixes * improvements * added doc comments for half of the components * add custom resolver + more doc comments * added all tsdocs * general improvements * add specs to UI docs * added github action * remove unnecessary api route * Added readme for react-docs-generator * remove comment * Update packages/design-system/ui/src/components/currency-input/currency-input.tsx Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com> * remove description of aria fields + add generate script --------- Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
"use client"
|
||||
|
||||
import getSectionId from "@/utils/get-section-id"
|
||||
import fetcher from "@/utils/swr-fetcher"
|
||||
import type { OpenAPIV3 } from "openapi-types"
|
||||
import useSWR from "swr"
|
||||
import type { Operation, PathsObject } from "@/types/openapi"
|
||||
import { SidebarItemSections, useSidebar, type SidebarItemType } from "docs-ui"
|
||||
import {
|
||||
SidebarItemSections,
|
||||
useSidebar,
|
||||
type SidebarItemType,
|
||||
swrFetcher,
|
||||
} from "docs-ui"
|
||||
import { Fragment, useEffect, useMemo } from "react"
|
||||
import dynamic from "next/dynamic"
|
||||
import type { TagOperationProps } from "../Operation"
|
||||
@@ -45,7 +49,7 @@ const TagPaths = ({ tag, className }: TagPathsProps) => {
|
||||
!Object.keys(paths).length
|
||||
? getLinkWithBasePath(`/tag?tagName=${tagSlugName}&area=${area}`)
|
||||
: null,
|
||||
fetcher,
|
||||
swrFetcher,
|
||||
{
|
||||
errorRetryInterval: 2000,
|
||||
}
|
||||
|
||||
@@ -3,13 +3,12 @@
|
||||
import type { OpenAPIV3 } from "openapi-types"
|
||||
import { useEffect, useState } from "react"
|
||||
import useSWR from "swr"
|
||||
import fetcher from "@/utils/swr-fetcher"
|
||||
import { useBaseSpecs } from "@/providers/base-specs"
|
||||
import dynamic from "next/dynamic"
|
||||
import type { TagSectionProps } from "./Section"
|
||||
import { useArea } from "@/providers/area"
|
||||
import getLinkWithBasePath from "@/utils/get-link-with-base-path"
|
||||
import { SidebarItemSections, useSidebar } from "docs-ui"
|
||||
import { SidebarItemSections, swrFetcher, useSidebar } from "docs-ui"
|
||||
import getSectionId from "@/utils/get-section-id"
|
||||
import { ExpandedDocument } from "@/types/openapi"
|
||||
import getTagChildSidebarItems from "@/utils/get-tag-child-sidebar-items"
|
||||
@@ -38,7 +37,7 @@ const Tags = () => {
|
||||
loadData && !baseSpecs
|
||||
? getLinkWithBasePath(`/base-specs?area=${area}&expand=${expand}`)
|
||||
: null,
|
||||
fetcher,
|
||||
swrFetcher,
|
||||
{
|
||||
errorRetryInterval: 2000,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user