diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..453861ee --- /dev/null +++ b/.prettierrc @@ -0,0 +1,12 @@ +{ + "semi": true, + "tabWidth": 2, + "printWidth": 80, + "singleQuote": false, + "trailingComma": "es5", + "bracketSpacing": true, + "bracketSameLine": false, + "arrowParens": "always", + "endOfLine": "lf", + "jsxSingleQuote": false +} diff --git a/src/components/CodePreview.tsx b/src/components/CodePreview.tsx index 2fb02aab..c1481ad6 100644 --- a/src/components/CodePreview.tsx +++ b/src/components/CodePreview.tsx @@ -17,7 +17,7 @@ const CodePreview = ({ language = "markdown", code }: Props) => { language={language} style={oneDark} wrapLines={true} - customStyle={{ margin: "0" }} + customStyle={{ margin: "0", maxHeight: "20rem" }} > {codeString} diff --git a/src/styles/main.css b/src/styles/main.css index 35d7b362..2bcadd29 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -557,18 +557,21 @@ body:has(.modal-overlay) { border-radius: var(--br-md); width: 100%; overflow-x: auto; - max-height: 20rem; position: relative; } .modal__copy { position: absolute; top: 0.5em; - right: 1em; + right: 1.2em; z-index: 10; isolation: isolate; } +.modal__copy:hover { + background: var(--bg-primary); +} + .modal__tags { display: flex; gap: 0.5em;