docs: prep for v2 documentation (#6710)
This PR includes documentation that preps for v2 docs (but doesn't introduce new docs). _Note: The number of file changes in the PR is due to find-and-replace within the `references` which is unavoidable. Let me know if I should move it to another PR._ ## Changes - Change Medusa version in base OAS used for v2. - Fix to docblock generator related to not catching all path parameters. - Added typedoc plugin that generates ER Diagrams, which will be used specifically for data model references in commerce modules. - Changed OAS tool to output references in `www/apps/api-reference/specs-v2` directory when the `--v2` option is used. - Added a version switcher to the API reference to switch between V1 and V2. This switcher is enabled by an environment variable, so it won't be visible/usable at the moment. - Upgraded docusaurus to v3.0.1 - Added new Vale rules to ensure correct spelling of Medusa Admin and module names. - Added new components to the `docs-ui` package that will be used in future documentation changes.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
"use client"
|
||||
|
||||
import React from "react"
|
||||
import { Tabs as UiTabs } from "@medusajs/ui"
|
||||
import { ComponentProps } from "react"
|
||||
import clsx from "clsx"
|
||||
import { Key } from "types"
|
||||
|
||||
export const Tabs = (props: ComponentProps<typeof UiTabs> & Key) => (
|
||||
<UiTabs {...props} />
|
||||
)
|
||||
|
||||
export const TabsList = ({
|
||||
className,
|
||||
...props
|
||||
}: ComponentProps<typeof UiTabs.List> & Key) => (
|
||||
<UiTabs.List {...props} className={clsx(className, "gap-docs_0.5")} />
|
||||
)
|
||||
|
||||
export const TabsTrigger = ({
|
||||
className,
|
||||
...props
|
||||
}: ComponentProps<typeof UiTabs.Trigger> & Key) => (
|
||||
<UiTabs.Trigger
|
||||
{...props}
|
||||
className={clsx(
|
||||
className,
|
||||
"px-[10px] py-docs_0.25 data-[state=active]:text-ui-fg-base data-[state=active]:bg-ui-bg-base data-[state=active]:shadow-elevation-card-rest",
|
||||
"hover:text-ui-fg-base focus-visible:border-ui-border-interactive focus-visible:!shadow-borders-focus focus-visible:bg-ui-bg-base"
|
||||
)}
|
||||
/>
|
||||
)
|
||||
|
||||
type TabsContentWrapperProps = {
|
||||
className?: string
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
export const TabsContentWrapper = ({
|
||||
className,
|
||||
...props
|
||||
}: TabsContentWrapperProps) => (
|
||||
<div {...props} className={clsx(className, "mt-docs_0.5")} />
|
||||
)
|
||||
|
||||
export const TabsContent = (
|
||||
props: ComponentProps<typeof UiTabs.Content> & Key
|
||||
) => <UiTabs.Content {...props} />
|
||||
Reference in New Issue
Block a user