File size: 761 Bytes
c964813
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import ReactMarkdown from "react-markdown";

import usageMarkdown from "./usage.md?raw";

export default function Usage() {
  return (
    <div className="prose leading-loose">
      <ReactMarkdown
        components={{
          h2: ({ children }) => <h2 className="text-xl font-semibold mt-12 mb-2 first:mt-4">{children}</h2>,
          p: ({ children }) => <p className="leading-6 mb-3 last:mb-0">{children}</p>,
          ol: ({ children }) => <ol className="list-decimal pl-5 mb-3">{children}</ol>,
          li: ({ children }) => <li className="mb-1">{children}</li>,
          code: ({ children }) => <code className="bg-gray-200 px-1 py-0.5 rounded">{children}</code>,
        }}
      >
        {usageMarkdown}
      </ReactMarkdown>
    </div>
  );
}