docs: fixes to ui docs (#9759)
This commit is contained in:
@@ -12,12 +12,12 @@ The `clx` function is a utility function for working with classNames. It is buil
|
|||||||
import { clx } from "@medusajs/ui"
|
import { clx } from "@medusajs/ui"
|
||||||
|
|
||||||
type BoxProps = {
|
type BoxProps = {
|
||||||
className?: string
|
className?: string
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
mt?: "sm" | "md" | "lg"
|
mt: "sm" | "md" | "lg"
|
||||||
}
|
}
|
||||||
|
|
||||||
const Box = ({ className, children }: BoxProps) => {
|
const Box = ({ className, children, mt }: BoxProps) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={clx(
|
className={clx(
|
||||||
@@ -34,6 +34,7 @@ const Box = ({ className, children }: BoxProps) => {
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
In the above example the utility is used to apply a base style, a margin top that is dependent on the `mt` prop and a custom className.
|
In the above example the utility is used to apply a base style, a margin top that is dependent on the `mt` prop and a custom className.
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ export const ExampleRegistry: Record<string, ExampleType> = {
|
|||||||
"alert-success": {
|
"alert-success": {
|
||||||
name: "alert-success",
|
name: "alert-success",
|
||||||
component: React.lazy(async () => import("@/examples/alert-success")),
|
component: React.lazy(async () => import("@/examples/alert-success")),
|
||||||
file: "src/examples/alert-demo.tsx",
|
file: "src/examples/alert-success.tsx",
|
||||||
},
|
},
|
||||||
"alert-warning": {
|
"alert-warning": {
|
||||||
name: "alert-warning",
|
name: "alert-warning",
|
||||||
component: React.lazy(async () => import("@/examples/alert-warning")),
|
component: React.lazy(async () => import("@/examples/alert-warning")),
|
||||||
file: "src/examples/alert-demo.tsx",
|
file: "src/examples/alert-warning.tsx",
|
||||||
},
|
},
|
||||||
"avatar-demo": {
|
"avatar-demo": {
|
||||||
name: "avatar-demo",
|
name: "avatar-demo",
|
||||||
|
|||||||
Reference in New Issue
Block a user