lbry-desktop/ui/component/claimAbandonButton/view.jsx
jessop 7730ee1e3f remove dependency on full claim list
paginate claim list
improve handling of pending publishes
add abandon to publishes list previews

use bodyCard

fix publish edit notification
2020-05-01 13:56:21 -04:00

21 lines
615 B
JavaScript

// @flow
import * as MODALS from 'constants/modal_types';
import * as ICONS from 'constants/icons';
import React from 'react';
import Button from 'component/button';
type Props = {
doOpenModal: (string, {}) => void,
claim: StreamClaim,
abandonActionCallback: any => void,
};
export default function ClaimAbandonButton(props: Props) {
const { doOpenModal, claim, abandonActionCallback } = props;
function abandonClaim() {
doOpenModal(MODALS.CONFIRM_CLAIM_REVOKE, { claim: claim, cb: abandonActionCallback });
}
return <Button button="secondary" icon={ICONS.DELETE} onClick={abandonClaim} />;
}