-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: DX improvements to a workflow / step reference page (#10906)
- Loading branch information
1 parent
428fce5
commit a126f40
Showing
23 changed files
with
138,372 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
www/packages/docs-ui/src/components/SourceCodeLink/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from "react" | ||
import { Link } from "../Link" | ||
import { Badge } from "../Badge" | ||
import { Github } from "@medusajs/icons" | ||
import clsx from "clsx" | ||
|
||
type SourceCodeLinkProps = { | ||
link: string | ||
text?: string | ||
icon?: React.ReactNode | ||
className?: string | ||
} | ||
|
||
export const SourceCodeLink = ({ | ||
link, | ||
text, | ||
icon, | ||
className, | ||
}: SourceCodeLinkProps) => { | ||
return ( | ||
<Link | ||
href={link} | ||
target="_blank" | ||
rel="noreferrer" | ||
className={clsx("my-docs_0.5 align-middle inline-block", className)} | ||
> | ||
<Badge | ||
variant="neutral" | ||
className="inline-flex hover:bg-medusa-tag-neutral-bg-hover cursor-pointer" | ||
childrenWrapperClassName="inline-flex flex-row gap-[3px] items-center" | ||
> | ||
{icon || <Github />} | ||
<span>{text || "Source Code"}</span> | ||
</Badge> | ||
</Link> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
www/packages/docs-ui/src/components/WorkflowDiagram/Common/Legend/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from "react" | ||
import { InlineCode } from "../../../InlineCode" | ||
import { Text } from "@medusajs/ui" | ||
import { Bolt, InformationCircle } from "@medusajs/icons" | ||
|
||
export const WorkflowDiagramLegend = () => { | ||
return ( | ||
<div className="flex gap-docs_0.5 mt-1"> | ||
<div className="flex items-center gap-docs_0.5"> | ||
<div className="flex size-[20px] items-center justify-center text-medusa-tag-orange-icon"> | ||
<Bolt /> | ||
</div> | ||
<Text | ||
size="xsmall" | ||
leading="compact" | ||
weight="plus" | ||
className="select-none" | ||
> | ||
Workflow Hook | ||
</Text> | ||
</div> | ||
<div className="flex items-center gap-docs_0.5"> | ||
<div className="flex size-[20px] items-center justify-center text-medusa-tag-green-icon"> | ||
<InformationCircle /> | ||
</div> | ||
<Text | ||
size="xsmall" | ||
leading="compact" | ||
weight="plus" | ||
className="select-none" | ||
> | ||
Step conditioned by <InlineCode>when</InlineCode> | ||
</Text> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.