mars-v2-frontend/src/components/WarningMessages.tsx
Bob van der Helm 0f48e4bd27
Hls latest (#637)
* env: enable HLS

* feat: added background and orb fading

* tidy: updated the token logos (#629)

* tidy: updated the token logos

* feat: added dydx

* fix: increase load spead of trading charts

* feat: first version of the UI shift

* Deployment for HLS testing

*  add APY to HLS staking

*  add APY account overview and summary

* fix: fixed the intro component visibility

*  add warning messages HLS

* fix: menu order

*  implement live APRs

* auto-select first account, add no balance message

* enable tabs for hls, fix net APY for deposit

* fix button for hls, sorting apy and console warnings

* disable feature flag HLS

* fix slider

* update routing

---------

Co-authored-by: Linkie Link <linkielink.dev@gmail.com>
2023-11-16 11:16:16 +01:00

41 lines
1.1 KiB
TypeScript

import Divider from 'components/Divider'
import { ExclamationMarkTriangle, InfoCircle } from 'components/Icons'
import Text from 'components/Text'
import { Tooltip } from 'components/Tooltip'
interface Props {
messages: string[]
}
export default function WarningMessages(props: Props) {
if (!props.messages.length) return null
return (
<div className='grid items-center pr-2 cursor-pointer'>
<Tooltip
content={
<div className='p-2'>
{props.messages.map((message, index) => (
<div key={message}>
<div className='grid grid-cols-[22px,auto] gap-2'>
<InfoCircle />
<div>
<Text size='sm'>{message}</Text>
{index !== props.messages.length - 1 && (
<Divider className='!bg-white/30 my-2' />
)}
</div>
</div>
</div>
))}
</div>
}
type='warning'
interactive
>
<ExclamationMarkTriangle width={24} className='text-warning' />
</Tooltip>
</div>
)
}