c4f8f4eab0
* MP-1757: implemented the WalletProvider and connect buttons * tidy: tidy up the search * MP-1691: moved modals outside of the DOM * MP-1691: changed CreditManager into AccountDetails * fix: fixed the naming * MP-1691: UX approvements * MP-1691: global confirm and delete modal added * fix: merged the credit-account and wallet branch * MP-1757: added the status store * fix: updated the store interaction * MP-1757: major cleanup of stores * tidy: format
34 lines
758 B
TypeScript
34 lines
758 B
TypeScript
import classNames from 'classnames'
|
|
import { ReactNode } from 'react'
|
|
|
|
import Button from 'components/Button'
|
|
|
|
interface Props {
|
|
className?: string
|
|
icon?: ReactNode
|
|
onClick: () => void
|
|
setShow: (show: boolean) => void
|
|
text: string | ReactNode
|
|
}
|
|
|
|
const OverlayAction = ({ className, icon, onClick, setShow, text }: Props) => {
|
|
return (
|
|
<Button
|
|
className={classNames(
|
|
'flex items-center whitespace-nowrap py-2 text-left text-sm text-accent-dark hover:text-secondary',
|
|
className,
|
|
)}
|
|
variant='text'
|
|
onClick={() => {
|
|
setShow(false)
|
|
onClick()
|
|
}}
|
|
>
|
|
{icon && <span className='mt-[1px] mr-2 flex w-4'>{icon}</span>}
|
|
{text}
|
|
</Button>
|
|
)
|
|
}
|
|
|
|
export default OverlayAction
|