Change text on hover in author follow button

This commit is contained in:
kvakazyambra 2023-06-15 23:44:49 +03:00
parent e045a06fd6
commit c03f961d10
2 changed files with 32 additions and 4 deletions

View File

@ -143,12 +143,27 @@
}
}
button {
.button {
margin-right: 0.5em;
width: 9em;
&:last-child {
margin-right: 0;
}
&:hover {
.buttonUnfollowLabel {
display: block;
}
.buttonSubscribedLabel {
display: none;
}
}
.buttonUnfollowLabel {
display: none;
}
}
}
@ -184,8 +199,6 @@
}
.buttonWrite {
//@include font-size(1.5rem);
color: #000;
display: inline-flex;
transition: background-color 0.3s, color 0.3s;

View File

@ -181,9 +181,24 @@ export const AuthorCard = (props: AuthorCardProps) => {
<Icon name="author-unsubscribe" class={styles.icon} />
</Show>
<Show when={props.isTextButton}>
<span class={clsx(styles.buttonLabel, styles.buttonLabelVisible)}>
<span
class={clsx(
styles.buttonLabel,
styles.buttonLabelVisible,
styles.buttonUnfollowLabel
)}
>
{t('Unfollow')}
</span>
<span
class={clsx(
styles.buttonLabel,
styles.buttonLabelVisible,
styles.buttonSubscribedLabel
)}
>
{t('You are subscribed')}
</span>
</Show>
</button>
</Show>