style: adjust padding and margin for EmbeddedLNInvoice
This commit is contained in:
@@ -107,7 +107,7 @@ const Content = memo(({ event, className }: { event: Event; className?: string }
|
|||||||
return <EmbeddedNormalUrl url={node.data} key={index} />
|
return <EmbeddedNormalUrl url={node.data} key={index} />
|
||||||
}
|
}
|
||||||
if (node.type === 'invoice') {
|
if (node.type === 'invoice') {
|
||||||
return <EmbeddedLNInvoice invoice={node.data} key={index} />
|
return <EmbeddedLNInvoice invoice={node.data} key={index} className="mt-2" />
|
||||||
}
|
}
|
||||||
if (node.type === 'websocket-url') {
|
if (node.type === 'websocket-url') {
|
||||||
return <EmbeddedWebsocketUrl url={node.data} key={index} />
|
return <EmbeddedWebsocketUrl url={node.data} key={index} />
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { formatAmount, getAmountFromInvoice } from '@/lib/lightning'
|
import { formatAmount, getAmountFromInvoice } from '@/lib/lightning'
|
||||||
|
import { cn } from '@/lib/utils'
|
||||||
import { useNostr } from '@/providers/NostrProvider'
|
import { useNostr } from '@/providers/NostrProvider'
|
||||||
import lightning from '@/services/lightning.service'
|
import lightning from '@/services/lightning.service'
|
||||||
import { Loader, Zap } from 'lucide-react'
|
import { Loader, Zap } from 'lucide-react'
|
||||||
@@ -7,7 +8,7 @@ import { useMemo, useState } from 'react'
|
|||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { toast } from 'sonner'
|
import { toast } from 'sonner'
|
||||||
|
|
||||||
export function EmbeddedLNInvoice({ invoice }: { invoice: string }) {
|
export function EmbeddedLNInvoice({ invoice, className }: { invoice: string; className?: string }) {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const { checkLogin, pubkey } = useNostr()
|
const { checkLogin, pubkey } = useNostr()
|
||||||
const [paying, setPaying] = useState(false)
|
const [paying, setPaying] = useState(false)
|
||||||
@@ -41,7 +42,7 @@ export function EmbeddedLNInvoice({ invoice }: { invoice: string }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className="p-2 sm:p-3 border rounded-lg cursor-default flex flex-col gap-3 max-w-sm"
|
className={cn('p-3 border rounded-lg cursor-default flex flex-col gap-3 max-w-sm', className)}
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
|
|||||||
Reference in New Issue
Block a user