lbry-desktop/ui/component/claimSupportButton/view.jsx
jessopb 3034f4ce6c
bring in styles (#7542)
* bring in ody styles; modify; cleanup

* workflow

* workflow

* v0.52.6-alpha.teststyles.1

* fix hook

* v0.52.6-alpha.teststyles.2

* style fixes

* fix pagination styling

* v0.52.6-alpha.teststyles.3

* wallet icon was bad

* restore deploy script

* fixes

* fix player close button

* modal inputs

* cleanup

* cleanup

* fix staked indicator

* fix profile menu button skel delay

* fix view-all-playlists hover

* fix overlay buttons on collection page

* fix header buttons
2022-04-17 13:04:56 -04:00

35 lines
1,009 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,
disableSupport: boolean,
claim: GenericClaim,
};
export default function ClaimSupportButton(props: Props) {
const { doOpenModal, uri, fileAction, disableSupport, claim } = props;
const isRepost = claim && claim.repost_url;
if (disableSupport) {
return null;
}
return (
<Button
button={fileAction ? undefined : 'secondary'}
className={classnames({ 'button--file-action': fileAction })}
icon={ICONS.LBC}
iconSize={fileAction ? 22 : undefined}
label={isRepost ? __('Support Repost') : __('Support --[button to support a claim]--')}
title={__('Support this claim')}
onClick={() => doOpenModal(MODALS.SEND_TIP, { uri, isSupport: true })}
/>
);
}