Skip to content

Commit

Permalink
docs: fixes to ui docs (#9759)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahednasser authored Oct 25, 2024
1 parent bf18d73 commit fd26839
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions www/apps/ui/src/content/docs/utils/clx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ The `clx` function is a utility function for working with classNames. It is buil
import { clx } from "@medusajs/ui"

type BoxProps = {
className?: string
children: React.ReactNode
mt?: "sm" | "md" | "lg"
className?: string
children: React.ReactNode
mt: "sm" | "md" | "lg"
}

const Box = ({ className, children }: BoxProps) => {
const Box = ({ className, children, mt }: BoxProps) => {
return (
<div
className={clx(
Expand All @@ -34,6 +34,7 @@ const Box = ({ className, children }: BoxProps) => {
</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.
Expand Down
4 changes: 2 additions & 2 deletions www/apps/ui/src/registries/example-registry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ export const ExampleRegistry: Record<string, ExampleType> = {
"alert-success": {
name: "alert-success",
component: React.lazy(async () => import("@/examples/alert-success")),
file: "src/examples/alert-demo.tsx",
file: "src/examples/alert-success.tsx",
},
"alert-warning": {
name: "alert-warning",
component: React.lazy(async () => import("@/examples/alert-warning")),
file: "src/examples/alert-demo.tsx",
file: "src/examples/alert-warning.tsx",
},
"avatar-demo": {
name: "avatar-demo",
Expand Down

0 comments on commit fd26839

Please sign in to comment.