Skip to content

Commit 60e28dc

Browse files
authored
Merge pull request #10 from Yugveer06/main
Added Prettier configuration file and fixed the modal scrollbar issue
2 parents b83edbd + 184405e commit 60e28dc

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.prettierrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"semi": true,
3+
"tabWidth": 2,
4+
"printWidth": 80,
5+
"singleQuote": false,
6+
"trailingComma": "es5",
7+
"bracketSpacing": true,
8+
"bracketSameLine": false,
9+
"arrowParens": "always",
10+
"endOfLine": "lf",
11+
"jsxSingleQuote": false
12+
}

src/components/CodePreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const CodePreview = ({ language = "markdown", code }: Props) => {
1717
language={language}
1818
style={oneDark}
1919
wrapLines={true}
20-
customStyle={{ margin: "0" }}
20+
customStyle={{ margin: "0", maxHeight: "20rem" }}
2121
>
2222
{codeString}
2323
</SyntaxHighlighter>

src/styles/main.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,18 +557,21 @@ body:has(.modal-overlay) {
557557
border-radius: var(--br-md);
558558
width: 100%;
559559
overflow-x: auto;
560-
max-height: 20rem;
561560
position: relative;
562561
}
563562

564563
.modal__copy {
565564
position: absolute;
566565
top: 0.5em;
567-
right: 1em;
566+
right: 1.2em;
568567
z-index: 10;
569568
isolation: isolate;
570569
}
571570

571+
.modal__copy:hover {
572+
background: var(--bg-primary);
573+
}
574+
572575
.modal__tags {
573576
display: flex;
574577
gap: 0.5em;

0 commit comments

Comments
 (0)