2f7b266e6b
* MP-1674: replaced the logo and added dekstop only nav * MP-1677: borrowCapacity implemented into the SubAccount Nav * MP-1677: adjusted the SubAccount navigation * M1677: fixed the button and SearchInput component * MP-1674: fixed the NavLink component * MP-1674: fixed the SubAccount navigation * tidy: cleaning up the trading view * MP-1674: added withdraw and funding functions * MP-1674: worked on the AccountStats * MP-1671: modal work * MP-1647: improvised CreditAccount expander * tidy: fixed the page structure * MP-1758: finished the SearchInput layout * MP-1759: updated the semicircle graphs * MP-1759: SemiCircle to Gauge * fix: implemented animated numbers * tidy: refactor * MP-1759: added Tooltip to the Gauge * fix: replace animate={true} with animate * fix: fixed the Gauge timing * fix: updated the BorrowCapacity styles * fix: renamed SubAccount to Account * fix: Text should not be a button, Button should be * tidy: format * fix: Text no clicky * fix: replaced all the Text appearances with onClick
37 lines
804 B
TypeScript
37 lines
804 B
TypeScript
import classNames from 'classnames'
|
|
import { ReactNode } from 'react'
|
|
|
|
interface Props {
|
|
children?: ReactNode | string
|
|
content?: ReactNode | string
|
|
className?: string
|
|
show: boolean
|
|
setShow: (show: boolean) => void
|
|
}
|
|
|
|
const Overlay = ({ children, content, className, show, setShow }: Props) => {
|
|
const onClickAway = () => {
|
|
setShow(false)
|
|
}
|
|
|
|
return show ? (
|
|
<>
|
|
<div
|
|
className={classNames(
|
|
'max-w-screen absolute z-50 rounded-lg shadow-overlay gradient-popover',
|
|
className,
|
|
)}
|
|
>
|
|
{children ? children : content}
|
|
</div>
|
|
<div
|
|
className='fixed top-0 left-0 z-40 block h-full w-full hover:cursor-pointer'
|
|
onClick={onClickAway}
|
|
role='button'
|
|
/>
|
|
</>
|
|
) : null
|
|
}
|
|
|
|
export default Overlay
|