give 1 sat fee button overlay but not button text
This commit is contained in:
parent
dd6e921e2e
commit
f9a99a7deb
|
@ -8,7 +8,7 @@ export default function ActionTooltip ({ children, notForm, disable, overlayText
|
|||
if (!notForm) {
|
||||
formik = useFormikContext()
|
||||
}
|
||||
if (disable) {
|
||||
if (disable || !overlayText) {
|
||||
return children
|
||||
}
|
||||
return (
|
||||
|
@ -16,7 +16,7 @@ export default function ActionTooltip ({ children, notForm, disable, overlayText
|
|||
placement={placement || 'bottom'}
|
||||
overlay={
|
||||
<Tooltip>
|
||||
{overlayText || '1 sat'}
|
||||
{overlayText}
|
||||
</Tooltip>
|
||||
}
|
||||
trigger={['hover', 'focus']}
|
||||
|
|
|
@ -118,12 +118,12 @@ export default function FeeButton ({ ChildButton = SubmitButton, variant, text,
|
|||
? 'free'
|
||||
: total > 1
|
||||
? numWithUnits(total, { abbreviate: false, format: true })
|
||||
: total === 1 ? undefined : 'free'
|
||||
: undefined
|
||||
disabled ||= ctxDisabled
|
||||
|
||||
return (
|
||||
<div className={styles.feeButton}>
|
||||
<ActionTooltip overlayText={feeText}>
|
||||
<ActionTooltip overlayText={!free && total === 1 ? '1 sat' : feeText}>
|
||||
<ChildButton variant={variant} disabled={disabled} nonDisabledText={feeText}>{text}</ChildButton>
|
||||
</ActionTooltip>
|
||||
{!me && <AnonInfo />}
|
||||
|
|
|
@ -52,7 +52,7 @@ export default function Poll ({ item }) {
|
|||
const variables = { id: v.id }
|
||||
|
||||
return (
|
||||
<ActionTooltip placement='left' notForm>
|
||||
<ActionTooltip placement='left' notForm overlayText='1 sat'>
|
||||
<Button
|
||||
variant='outline-info' className={styles.pollButton}
|
||||
onClick={me
|
||||
|
|
Loading…
Reference in New Issue