Skip to content

Commit

Permalink
Fix banner placeholder hover
Browse files Browse the repository at this point in the history
  • Loading branch information
moysa committed Jul 25, 2023
1 parent 95080d2 commit 85c5304
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/pages/EditProfile.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
padding-bottom: 20px;
}

.bannerPlaceholder {
position: relative;
width: 100%;
height: 214px;
}

.banner {
position: relative;
width: 100%;
Expand All @@ -24,8 +30,9 @@
opacity: 0.6;
}

>label {
>label, .bannerPlaceholder>label {
position: relative;
height: 100%;
cursor: pointer;

>img {
Expand Down
7 changes: 6 additions & 1 deletion src/pages/EditProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,12 @@ const EditProfile: Component = () => {
</Show>
<Show
when={banner()}
fallback={<div class={styles.bannerPlaceholder}></div>}
fallback={
<div class={styles.bannerPlaceholder}>
<label for="upload-banner">
<div>{intl.formatMessage(tSettings.profile.uploadBanner)}</div>
</label>
</div>}
>
<label for="upload-banner">
<img
Expand Down

0 comments on commit 85c5304

Please sign in to comment.