Change texts on hover in the subscribe buttons

This commit is contained in:
kvakazyambra 2023-06-12 22:59:25 +03:00
parent b424ec9bca
commit ac09ac3067
2 changed files with 16 additions and 1 deletions

View File

@ -127,10 +127,24 @@
background: #000; background: #000;
color: #fff; color: #fff;
transition: background-color 0.3s, color 0.3s; transition: background-color 0.3s, color 0.3s;
white-space: nowrap;
width: 9em;
&:hover { &:hover {
background: #fff; background: #fff;
color: #000; color: #000;
.buttonUnfollowLabel {
display: block;
}
.buttonSubscribedLabel {
display: none;
}
}
.buttonUnfollowLabel {
display: none;
} }
} }

View File

@ -115,7 +115,8 @@ export const TopicCard = (props: TopicProps) => {
</Show> </Show>
<Show when={!props.iconButton}> <Show when={!props.iconButton}>
<Show when={subscribed()} fallback={t('Follow')}> <Show when={subscribed()} fallback={t('Follow')}>
{t('Unfollow')} <span class={styles.buttonUnfollowLabel}>{t('Unfollow')}</span>
<span class={styles.buttonSubscribedLabel}>{t('You are subscribed')}</span>
</Show> </Show>
</Show> </Show>
</button> </button>