2023-01-05 01:04:09 -08:00
|
|
|
import { LinkButton } from '@components/shared/Button'
|
2023-10-03 22:05:16 -07:00
|
|
|
import useMangoAccount from 'hooks/useMangoAccount'
|
2023-01-05 01:04:09 -08:00
|
|
|
import { ReactNode } from 'react'
|
|
|
|
|
|
|
|
const ActionsLinkButton = ({
|
|
|
|
children,
|
2023-07-08 04:41:10 -07:00
|
|
|
disabled,
|
2023-01-05 01:04:09 -08:00
|
|
|
onClick,
|
|
|
|
}: {
|
|
|
|
children: ReactNode
|
2023-07-08 04:41:10 -07:00
|
|
|
disabled?: boolean
|
2023-01-05 01:04:09 -08:00
|
|
|
onClick: () => void
|
|
|
|
}) => {
|
2023-10-03 22:05:16 -07:00
|
|
|
const { mangoAccountAddress } = useMangoAccount()
|
2023-01-05 01:04:09 -08:00
|
|
|
return (
|
|
|
|
<LinkButton
|
2023-04-20 19:32:20 -07:00
|
|
|
className="w-full whitespace-nowrap text-left font-normal"
|
2023-10-03 22:05:16 -07:00
|
|
|
disabled={!mangoAccountAddress || disabled}
|
2023-01-05 01:04:09 -08:00
|
|
|
onClick={onClick}
|
|
|
|
>
|
|
|
|
{children}
|
|
|
|
</LinkButton>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ActionsLinkButton
|