fix(ui): Fixed CodeBlock line number width (#5640)
**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
This commit is contained in:
committed by
GitHub
parent
95aa5a2d28
commit
a67a8e7e90
@@ -8,7 +8,7 @@ const codeBlockProps: PropDataMap = [
|
||||
type: "object",
|
||||
name: "CodeSnippet[]",
|
||||
shape:
|
||||
"{\n label: string\n language: string\n code: string\n hideLineNumbers?: boolean\n}[]",
|
||||
"{\n label: string\n language: string\n code: string\n hideLineNumbers?: boolean\n hideCopy?: boolean\n}[]",
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user