IsolationModeWarning.tsx
1 import { Trans } from '@lingui/macro'; 2 import { AlertColor, Typography } from '@mui/material'; 3 4 import { Link } from '../../primitives/Link'; 5 import { Warning } from '../../primitives/Warning'; 6 7 interface IsolationModeWarningProps { 8 asset?: string; 9 severity?: AlertColor; 10 } 11 12 export const IsolationModeWarning = ({ asset, severity }: IsolationModeWarningProps) => { 13 return ( 14 <Warning severity={severity || 'info'} sx={{ mb: 3 }}> 15 <Typography variant="subheader1" mb={0.5}> 16 <Trans>You are entering Isolation mode</Trans> 17 </Typography> 18 <Typography> 19 <Trans> 20 In Isolation mode, you cannot supply other assets as collateral. A global debt ceiling 21 limits the borrowing power of the isolated asset. To exit isolation mode disable{' '} 22 {asset ? asset : ''} as collateral before borrowing another asset. Read more in our{' '} 23 <Link href="https://docs.aave.com/faq/aave-v3-features#isolation-mode">FAQ</Link> 24 </Trans> 25 </Typography> 26 </Warning> 27 ); 28 };