add libraries to the docs (will probably re-design later)
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 2m36s
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 2m36s
This commit is contained in:
@ -9,6 +9,11 @@ type CodeHighlighterProps = {
|
||||
*/
|
||||
code: string;
|
||||
|
||||
/**
|
||||
* The language of the code.
|
||||
*/
|
||||
language?: string;
|
||||
|
||||
/**
|
||||
* Should the element be rounded?
|
||||
*/
|
||||
@ -62,11 +67,11 @@ function rowRenderer({
|
||||
});
|
||||
}
|
||||
|
||||
export function CodeHighlighter({ code, rounded = true }: CodeHighlighterProps): ReactElement {
|
||||
export function CodeHighlighter({ code, language = "json", rounded = true }: CodeHighlighterProps): ReactElement {
|
||||
return (
|
||||
<div className="text-xs md:text-md">
|
||||
<SyntaxHighlighter
|
||||
language="json"
|
||||
language={language}
|
||||
style={atomOneDark}
|
||||
wrapLongLines
|
||||
renderer={rowRenderer}
|
||||
|
Reference in New Issue
Block a user