chore: reorganize docs apps (#7228)

* reorganize docs apps

* add README

* fix directory

* add condition for old docs
This commit is contained in:
Shahed Nasser
2024-05-03 17:36:38 +03:00
committed by GitHub
parent 224ebb2154
commit 4fe28f5a95
6187 changed files with 601447 additions and 598226 deletions
@@ -18,6 +18,7 @@ export const NoteLayout = ({
type === "error" ||
type === "check"
const isWarningStyle = type === "warning"
const isSoonStyle = type === "soon"
return (
<div
@@ -26,6 +27,7 @@ export const NoteLayout = ({
isDefaultStyle &&
"bg-medusa-tag-neutral-bg border-medusa-tag-neutral-border",
isWarningStyle && "bg-medusa-tag-red-bg border-medusa-tag-red-border",
isSoonStyle && "bg-medusa-tag-blue-bg border-medusa-tag-blue-border",
"[&_a]:no-underline [&_a]:text-medusa-fg-interactive hover:[&_a]:text-medusa-fg-interactive-hover ",
"mb-docs_2 alert"
)}
@@ -36,6 +38,7 @@ export const NoteLayout = ({
className={clsx(
isDefaultStyle && "text-medusa-tag-neutral-text",
isWarningStyle && "text-medusa-tag-red-text",
isSoonStyle && "text-medusa-tag-blue-text",
"text-medium flex-1 [&>*:last-child]:mb-0",
"[&>p>code]:px-docs_0.5 [&>p>code]:text-code-label"
)}
@@ -45,7 +48,8 @@ export const NoteLayout = ({
className={clsx(
"text-compact-medium-plus block mb-docs_0.125",
isDefaultStyle && "text-medusa-fg-base",
isWarningStyle && "text-medusa-tag-red-text"
isWarningStyle && "text-medusa-tag-red-text",
isSoonStyle && "text-medusa-tag-blue-text"
)}
>
{title}
@@ -0,0 +1,27 @@
import React from "react"
import { NoteProps } from ".."
import { NoteLayout } from "../Layout"
import { LightBulb } from "@medusajs/icons"
import clsx from "clsx"
export const SoonNote = ({
title = "Coming soon",
icon,
...props
}: NoteProps) => {
return (
<NoteLayout
title={title}
icon={
icon || (
<LightBulb
className={clsx(
"inline-block mr-docs_0.125 text-medusa-tag-blue-icon"
)}
/>
)
}
{...props}
/>
)
}
@@ -4,9 +4,10 @@ import { DefaultNote } from "./Types/default"
import { SuccessNote } from "./Types/sucess"
import { ErrorNote } from "./Types/error"
import { CheckNote } from "./Types/checks"
import { SoonNote } from "./Types/soon"
export type NoteProps = {
type?: "default" | "warning" | "success" | "error" | "check"
type?: "default" | "warning" | "success" | "error" | "check" | "soon"
title?: string
children?: React.ReactNode
icon?: React.ReactNode
@@ -22,6 +23,8 @@ export const Note = ({ type = "default", ...props }: NoteProps) => {
return <ErrorNote type={type} {...props} />
case "check":
return <CheckNote type={type} {...props} />
case "soon":
return <SoonNote type={type} {...props} />
default:
return <DefaultNote type={type} {...props} />
}