Components Test
Testing the refined MDX components
Components Test
This page tests the enhanced MDX components.
Code Blocks
With Title
import * as React from "react"
import { Slot } from "@radix-ui/react-slot"
export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
asChild?: boolean
}
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button"
return (
<Comp
className={cn(buttonVariants({ variant, size, className }))}
ref={ref}
{...props}
/>
)
}
)
Button.displayName = "Button"Without Title
npm install nextTabs
npm install @radix-ui/react-tabsCallouts
This is an info callout with some bold text.
This is a warning callout. Proceed with caution.
This is an error callout. Something went wrong.
This is a success callout. Operation completed.
Steps
Mermaid Diagrams
Code Tabs (Advanced)
npm install mermaidTable
| Prop | Type | Description |
|---|---|---|
children | React.ReactNode | The content to render |
className | string | Additional CSS classes |
variant | `default | destructive` |