**What** - Fixes the width of lineNumbers in the CodeBlock component according to the widest number. - Introduces a new prop on snippets that allows users to hide the copy button. Also updated docs to reflect this. Before:  After: <img width="742" alt="image" src="https://github.com/medusajs/medusa/assets/45367945/5ce845f7-b8c7-411c-abfb-fa03448aeb1a"> Closes #5639
21 lines
467 B
TypeScript
21 lines
467 B
TypeScript
import { PropTable } from "@/components/props-table"
|
|
import { PropDataMap } from "@/types/props"
|
|
|
|
const codeBlockProps: PropDataMap = [
|
|
{
|
|
prop: "snippets",
|
|
type: {
|
|
type: "object",
|
|
name: "CodeSnippet[]",
|
|
shape:
|
|
"{\n label: string\n language: string\n code: string\n hideLineNumbers?: boolean\n hideCopy?: boolean\n}[]",
|
|
},
|
|
},
|
|
]
|
|
|
|
const Props = () => {
|
|
return <PropTable props={codeBlockProps} />
|
|
}
|
|
|
|
export default Props
|