Install button

This commit is contained in:
Jake Archibald
2020-11-26 16:08:55 +00:00
parent 4abc7f40d1
commit be818caf48
2 changed files with 24 additions and 3 deletions

View File

@@ -227,9 +227,6 @@ export default class Intro extends Component<Props, State> {
type="file"
onChange={this.onFileChange}
/>
{beforeInstallEvent && (
<button onClick={this.onInstallClick}>Install</button>
)}
<div class={style.main}>
{!__PRERENDER__ && (
<canvas
@@ -328,6 +325,11 @@ export default class Intro extends Component<Props, State> {
</footer>
</div>
</div>
{beforeInstallEvent && (
<button class={style.installBtn} onClick={this.onInstallClick}>
Install
</button>
)}
</div>
);
}

View File

@@ -148,3 +148,22 @@
height: auto;
}
}
@keyframes fade-in {
from {
opacity: 0;
}
}
.install-btn {
composes: unbutton from global;
position: absolute;
top: 1rem;
right: 1rem;
background: var(--deep-blue);
border-radius: 0.4em;
color: var(--white);
padding: 0.5em 1em;
font-size: 1.6rem;
animation: fade-in 600ms ease-in-out;
}