give 1 sat fee button overlay but not button text

This commit is contained in:
keyan 2024-04-17 14:22:17 -05:00
parent dd6e921e2e
commit f9a99a7deb
3 changed files with 5 additions and 5 deletions

View File

@ -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']}

View File

@ -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 />}

View File

@ -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