fix: spotlight bugs
This commit is contained in:
@ -15,7 +15,7 @@
|
|||||||
max-width: 100vw;
|
max-width: 100vw;
|
||||||
max-height: 99vh;
|
max-height: 99vh;
|
||||||
aspect-ratio: unset;
|
aspect-ratio: unset;
|
||||||
width: unset;
|
width: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spotlight .details {
|
.spotlight .details {
|
||||||
|
@ -21,13 +21,17 @@ export function SpotlightMedia(props: SpotlightMediaProps) {
|
|||||||
const handleKeyDown = (e: KeyboardEvent) => {
|
const handleKeyDown = (e: KeyboardEvent) => {
|
||||||
switch (e.key) {
|
switch (e.key) {
|
||||||
case "ArrowLeft":
|
case "ArrowLeft":
|
||||||
case "ArrowUp":
|
case "ArrowUp": {
|
||||||
|
e.preventDefault();
|
||||||
dec();
|
dec();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "ArrowRight":
|
case "ArrowRight":
|
||||||
case "ArrowDown":
|
case "ArrowDown": {
|
||||||
|
e.preventDefault();
|
||||||
inc();
|
inc();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -64,8 +68,24 @@ export function SpotlightMedia(props: SpotlightMediaProps) {
|
|||||||
</div>
|
</div>
|
||||||
{props.images.length > 1 && (
|
{props.images.length > 1 && (
|
||||||
<>
|
<>
|
||||||
<Icon className="left" name="arrowFront" size={24} onClick={() => dec()} />
|
<Icon
|
||||||
<Icon className="right" name="arrowFront" size={24} onClick={() => inc()} />
|
className="left"
|
||||||
|
name="arrowFront"
|
||||||
|
size={24}
|
||||||
|
onClick={e => {
|
||||||
|
e.stopPropagation();
|
||||||
|
dec();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Icon
|
||||||
|
className="right"
|
||||||
|
name="arrowFront"
|
||||||
|
size={24}
|
||||||
|
onClick={e => {
|
||||||
|
e.stopPropagation();
|
||||||
|
inc();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user