File tree Expand file tree Collapse file tree 3 files changed +45
-33
lines changed Expand file tree Collapse file tree 3 files changed +45
-33
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ const CodePreview = ({ language = "markdown", code }: Props) => {
40
40
language = { language }
41
41
style = { theme === "dark" ? oneDark : oneLight }
42
42
wrapLines = { true }
43
- customStyle = { { margin : "0" , maxHeight : "20rem " } }
43
+ customStyle = { { margin : "0" , maxHeight : "32rem " } }
44
44
>
45
45
{ code }
46
46
</ SyntaxHighlighter >
Original file line number Diff line number Diff line change @@ -58,29 +58,31 @@ const SnippetModal: React.FC<Props> = ({
58
58
< CloseIcon />
59
59
</ Button >
60
60
</ div >
61
- < CodePreview language = { slugify ( language ) } code = { snippet . code } />
62
- < p >
63
- < b > Description: </ b >
64
- { snippet . description }
65
- </ p >
66
- < p >
67
- Contributed by{ " " }
68
- < a
69
- href = { `https://github.com/${ snippet . author } ` }
70
- target = "_blank"
71
- rel = "noopener noreferrer"
72
- className = "styled-link"
73
- >
74
- @{ snippet . author }
75
- </ a >
76
- </ p >
77
- < ul role = "list" className = "modal__tags" >
78
- { snippet . tags . map ( ( tag ) => (
79
- < li key = { tag } className = "modal__tag" >
80
- { tag }
81
- </ li >
82
- ) ) }
83
- </ ul >
61
+ < div className = "modal__body | flow" >
62
+ < CodePreview language = { slugify ( language ) } code = { snippet . code } />
63
+ < p >
64
+ < b > Description: </ b >
65
+ { snippet . description }
66
+ </ p >
67
+ < p >
68
+ Contributed by{ " " }
69
+ < a
70
+ href = { `https://github.com/${ snippet . author } ` }
71
+ target = "_blank"
72
+ rel = "noopener noreferrer"
73
+ className = "styled-link"
74
+ >
75
+ @{ snippet . author }
76
+ </ a >
77
+ </ p >
78
+ < ul role = "list" className = "modal__tags" >
79
+ { snippet . tags . map ( ( tag ) => (
80
+ < li key = { tag } className = "modal__tag" >
81
+ { tag }
82
+ </ li >
83
+ ) ) }
84
+ </ ul >
85
+ </ div >
84
86
</ motion . div >
85
87
</ motion . div > ,
86
88
modalRoot
Original file line number Diff line number Diff line change @@ -550,22 +550,19 @@ abbr {
550
550
border-radius : var (--br-lg );
551
551
padding : 0.75em ;
552
552
text-align : start;
553
- filter : grayscale (100% );
554
553
555
554
& : is (: hover , : focus-visible ) {
556
- outline : 3px solid var (--clr-border-primary );
557
- filter : grayscale (0 );
555
+ outline : 2px solid var (--clr-border-primary );
558
556
}
559
557
}
560
558
561
559
.snippet__preview {
562
560
width : 100% ;
563
561
overflow : hidden;
564
- aspect-ratio : 10 / 3 ;
562
+ aspect-ratio : 9 / 3 ;
565
563
background-color : var (--clr-bg-secondary );
566
564
/* background-image: var(--gradient-secondary); */
567
565
border : 1px solid var (--clr-border-primary );
568
- border-radius : var (--br-md );
569
566
position : relative;
570
567
padding-inline : 1em ;
571
568
display : grid;
@@ -599,20 +596,33 @@ body:has(.modal-overlay) {
599
596
600
597
.modal {
601
598
background-color : var (--clr-bg-secondary );
602
- padding : 2 rem ;
603
- width : 90 % ;
604
- max-width : 800 px ;
599
+ width : fit-content ;
600
+ max- width: 1000 px ;
601
+ max-height : 90 % ;
605
602
border-radius : var (--br-lg );
606
603
box-shadow : 0 4px 12px rgba (0 , 0 , 0 , 0.3 );
604
+ gap : 0 ;
607
605
position : relative;
608
- gap : 1 rem ;
606
+ overflow : auto ;
609
607
}
610
608
611
609
.modal__header {
610
+ z-index : 50 ;
612
611
display : flex;
612
+ position : sticky;
613
+ top : 0 ;
613
614
align-items : center;
614
615
justify-content : space-between;
615
616
gap : 1rem ;
617
+ padding : 1rem 1.5rem ;
618
+ background-color : var (--clr-bg-secondary );
619
+ border-radius : var (--br-lg );
620
+ }
621
+
622
+ .modal__body {
623
+ padding : 1.5rem ;
624
+ padding-top : 0 ;
625
+ gap : 1rem ;
616
626
}
617
627
618
628
.code-preview {
You can’t perform that action at this time.
0 commit comments