Adding tooltip to share, block, and follow buttons.

This commit is contained in:
calvincodes 2020-04-27 21:19:05 -07:00 committed by Sean Yesmunt
parent 700df02a59
commit 1d30078c90
3 changed files with 5 additions and 0 deletions

View file

@ -21,6 +21,7 @@ export default function BlockButton(props: Props) {
const blockRef = useRef();
const isHovering = useHover(blockRef);
const blockLabel = channelIsBlocked ? __('Blocked') : __('Block');
const blockTitlePrefix = channelIsBlocked ? __('Unblock') : __('Block');
const blockedOverride = channelIsBlocked && isHovering && __('Unblock');
return permanentUrl && !claimIsMine ? (
@ -29,6 +30,7 @@ export default function BlockButton(props: Props) {
icon={ICONS.BLOCK}
button={'alt'}
label={blockedOverride || blockLabel}
title={`${blockTitlePrefix} ${__('this channel')}`}
requiresAuth={IS_WEB}
onClick={e => {
e.stopPropagation();

View file

@ -17,6 +17,7 @@ export default function ShareButton(props: Props) {
button="alt"
icon={ICONS.SHARE}
label={__('Share')}
title={__('Share this channel')}
onClick={() => doOpenModal(MODALS.SOCIAL_SHARE, { uri, webShareable: true })}
/>
);

View file

@ -50,6 +50,7 @@ export default function SubscribeButton(props: Props) {
const unfollowOverride = isSubscribed && isHovering && __('Unfollow');
const label = isMobile && shrinkOnMobile ? '' : unfollowOverride || subscriptionLabel;
const titlePrefix = isSubscribed ? __('Unfollow') : __('Follow');
return permanentUrl ? (
<Button
@ -60,6 +61,7 @@ export default function SubscribeButton(props: Props) {
button={'alt'}
requiresAuth={IS_WEB}
label={label}
title={`${titlePrefix} ${__('this channel')}`}
onClick={e => {
e.stopPropagation();