lbry-desktop/ui/component/claimSupportButton/view.jsx
infiinte-persistence 6dd40df93b Str-context-split: "Support"
Chinese, Spanish and other translators reported the difficulty in using "Support" as both a noun and verb in their language.
2020-10-14 17:44:44 -04:00

30 lines
832 B
JavaScript

// @flow
import * as MODALS from 'constants/modal_types';
import * as ICONS from 'constants/icons';
import React from 'react';
import classnames from 'classnames';
import Button from 'component/button';
type Props = {
uri: string,
doOpenModal: (string, {}) => void,
fileAction?: boolean,
};
export default function ClaimSupportButton(props: Props) {
const { doOpenModal, uri, fileAction } = props;
return (
<Button
button={fileAction ? undefined : 'alt'}
className={classnames({ 'button--file-action': fileAction })}
icon={ICONS.LBC}
iconSize={fileAction ? 22 : undefined}
label={__('Support --[button to support a claim]--')}
requiresAuth={IS_WEB}
title={__('Support this claim')}
onClick={() => doOpenModal(MODALS.SEND_TIP, { uri, isSupport: true })}
/>
);
}