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:
@@ -11,6 +11,11 @@ import * as React from "react"
|
||||
import { ProgressStatus } from "@/types"
|
||||
import { clx } from "@/utils/clx"
|
||||
|
||||
/**
|
||||
* This component is based on the [Radix UI Tabs](https://radix-ui.com/primitives/docs/components/tabs) primitves.
|
||||
*
|
||||
* @excludeExternal
|
||||
*/
|
||||
const ProgressTabsRoot = (props: ProgressTabsPrimitives.TabsProps) => {
|
||||
return <ProgressTabsPrimitives.Root {...props} />
|
||||
}
|
||||
@@ -18,10 +23,17 @@ ProgressTabsRoot.displayName = "ProgressTabs"
|
||||
|
||||
interface IndicatorProps
|
||||
extends Omit<React.ComponentPropsWithoutRef<"span">, "children"> {
|
||||
/**
|
||||
* The current status.
|
||||
*/
|
||||
status?: ProgressStatus
|
||||
}
|
||||
|
||||
const ProgressIndicator = ({ status, className, ...props }: IndicatorProps) => {
|
||||
const ProgressIndicator = ({
|
||||
status,
|
||||
className,
|
||||
...props
|
||||
}: IndicatorProps) => {
|
||||
const Icon = React.useMemo(() => {
|
||||
switch (status) {
|
||||
case "not-started":
|
||||
@@ -47,6 +59,7 @@ const ProgressIndicator = ({ status, className, ...props }: IndicatorProps) => {
|
||||
</span>
|
||||
)
|
||||
}
|
||||
ProgressIndicator.displayName = "ProgressTabs.ProgressIndicator"
|
||||
|
||||
interface ProgressTabsTriggerProps
|
||||
extends Omit<
|
||||
@@ -59,7 +72,7 @@ interface ProgressTabsTriggerProps
|
||||
const ProgressTabsTrigger = React.forwardRef<
|
||||
React.ElementRef<typeof ProgressTabsPrimitives.Trigger>,
|
||||
ProgressTabsTriggerProps
|
||||
>(({ className, children, status = "not-started", ...props }, ref) => (
|
||||
>(({ className, children, status = "not-started", ...props }: ProgressTabsTriggerProps, ref) => (
|
||||
<ProgressTabsPrimitives.Trigger
|
||||
ref={ref}
|
||||
className={clx(
|
||||
|
||||
Reference in New Issue
Block a user