forked from external-repos/squoosh
Install button
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user