File tree Expand file tree Collapse file tree 4 files changed +12
-15
lines changed Expand file tree Collapse file tree 4 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,7 @@ const LineInput: FC<InputProps> = (props) => {
3333
3434 return (
3535 < div className = { `${ props . className } w-full flex flex-col gap-1 text-sm` } >
36- < BlurOverlay
37- isActive = { isPopupOpen }
38- closePopup = { ( ) => setIsPopupOpen ( false ) }
39- />
36+ < BlurOverlay isActive = { isPopupOpen } />
4037
4138 < LinePopup
4239 addBadge = { addBadge }
@@ -127,7 +124,9 @@ const LineInput: FC<InputProps> = (props) => {
127124 ( e . target as HTMLImageElement ) . style . display = "none" ;
128125 } }
129126 className = "w-4 h-4"
130- src = { `https://cdn.simpleicons.org/${ badge . iconName } /${
127+ src = { `https://cdn.simpleicons.org/${ encodeURI (
128+ badge . iconName
129+ ) } /${
131130 badge . color === "auto" ? "" : badge . color . replace ( "#" , "" )
132131 } `}
133132 alt = ""
Original file line number Diff line number Diff line change 1- import { FC , useEffect } from "react" ;
1+ import { FC } from "react" ;
22
33interface OverlayProps {
44 isActive : boolean ;
5- closePopup ?: ( ) => void ;
65}
76
87const BlurOverlay : FC < OverlayProps > = ( props ) => {
9- useEffect ( ( ) => {
10- document . body . style . overflow = props . isActive ? "hidden" : "auto" ;
11- } , [ props . isActive ] ) ;
12-
138 return (
149 < div
1510 className = { `w-screen h-screen fixed top-0 left-0 transition-all duration-300
16- z-20 ${ props . isActive ? "backdrop-blur-sm" : "pointer-events-none" } ` }
17- onClick = { props . closePopup }
11+ z-20 ${
12+ props . isActive
13+ ? "backdrop-blur-sm bg-black/[.5]"
14+ : "pointer-events-none"
15+ } `}
1816 />
1917 ) ;
2018} ;
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ const LinePopup: FC<LinePopupProps> = (props) => {
3939 } ;
4040
4141 const activeClasses = "opacity-100 pointer-events-auto scale-100" ;
42- const inactiveClasses = "opacity-0 pointer-events-none scale-0 " ;
42+ const inactiveClasses = "opacity-0 pointer-events-none scale-50 " ;
4343
4444 return (
4545 < div
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ export const generateLink = ({
183183 let line = `&line${ l . lineNumber } =` ;
184184 for ( const b of l . badges ) {
185185 const color = b . color . replace ( "#" , "" ) ;
186- line += `${ b . iconName } ,${ b . label } ,${ color } ;` ;
186+ line += `${ encodeURI ( b . iconName ) } ,${ encodeURI ( b . label ) } ,${ color } ;` ;
187187 }
188188
189189 res += line ;
You can’t perform that action at this time.
0 commit comments