Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cancel button for exiting install modal #835

11 changes: 11 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ html,
color: white;
}

.close-icon {
position: absolute;
right: 2rem;
top: 2rem;
cursor: pointer;
}

.close-icon-container {
position: relative !important;
}

.button.is-secondary:hover {
background: var(--secondary-hover);
color: var(--text-tertiary);
Expand Down
7 changes: 5 additions & 2 deletions src/screens/Library/components/InstallModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getInstallInfo, getProgress, install, writeConfig } from 'src/helpers'
import React, { useContext, useEffect, useState } from 'react'

import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faFolderOpen } from '@fortawesome/free-solid-svg-icons'
import { faFolderOpen, faXmark } from '@fortawesome/free-solid-svg-icons'
import { faWindows, faApple } from '@fortawesome/free-brands-svg-icons'
import prettyBytes from 'pretty-bytes'
import { Checkbox } from '@material-ui/core'
Expand Down Expand Up @@ -173,7 +173,10 @@ export default function InstallModal({ appName, backdropClick }: Props) {
return (
<span className="modalContainer">
{gameInfo?.game?.title ? (
<div className="modal">
<div className="modal close-icon-container">
arielj marked this conversation as resolved.
Show resolved Hide resolved
<SvgButton onClick={() => backdropClick()}>
<FontAwesomeIcon className={'close-icon'} icon={faXmark} />
arielj marked this conversation as resolved.
Show resolved Hide resolved
</SvgButton>
<span className="title">
{gameInfo?.game?.title}
<FontAwesomeIcon icon={isMacNative ? faApple : faWindows} />
Expand Down