3034f4ce6c
* 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
61 lines
1.8 KiB
JavaScript
61 lines
1.8 KiB
JavaScript
// @flow
|
|
import React from 'react';
|
|
import { FormField, FormFieldPrice } from 'component/common/form';
|
|
import Card from 'component/common/card';
|
|
|
|
type Props = {
|
|
contentIsFree: boolean,
|
|
fee: Fee,
|
|
disabled: boolean,
|
|
updatePublishForm: ({}) => void,
|
|
};
|
|
|
|
function PublishPrice(props: Props) {
|
|
const { contentIsFree, fee, updatePublishForm, disabled } = props;
|
|
|
|
return (
|
|
<>
|
|
<label>{__('Price')}</label>
|
|
<Card
|
|
actions={
|
|
<React.Fragment>
|
|
<FormField
|
|
type="radio"
|
|
name="content_free"
|
|
label={__('Free')}
|
|
checked={contentIsFree}
|
|
disabled={disabled}
|
|
onChange={() => updatePublishForm({ contentIsFree: true })}
|
|
/>
|
|
|
|
<FormField
|
|
type="radio"
|
|
name="content_cost"
|
|
label={__('Add a price to this file')}
|
|
checked={!contentIsFree}
|
|
disabled={disabled}
|
|
onChange={() => updatePublishForm({ contentIsFree: false })}
|
|
/>
|
|
{!contentIsFree && (
|
|
<FormFieldPrice
|
|
name="content_cost_amount"
|
|
min={0}
|
|
price={fee}
|
|
onChange={(newFee) => updatePublishForm({ fee: newFee })}
|
|
/>
|
|
)}
|
|
{fee && fee.currency !== 'LBC' && (
|
|
<p className="form-field__help">
|
|
{__(
|
|
'All content fees are charged in LBRY Credits. For alternative payment methods, the number of LBRY Credits charged will be adjusted based on the value of LBRY Credits at the time of purchase.'
|
|
)}
|
|
</p>
|
|
)}
|
|
</React.Fragment>
|
|
}
|
|
/>
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default PublishPrice;
|