/ src / modules / migration / MigrationListItemToggler.tsx
MigrationListItemToggler.tsx
 1  import { Box, Switch } from '@mui/material';
 2  import React from 'react';
 3  
 4  import { IsolatedEnabledBadge } from '../../components/isolationMode/IsolatedBadge';
 5  
 6  interface MigrationListItemTogglerProps {
 7    enableAsCollateral: () => void;
 8    enabledAsCollateral?: boolean;
 9  }
10  
11  export const MigrationListItemToggler = ({
12    enableAsCollateral,
13    enabledAsCollateral,
14  }: MigrationListItemTogglerProps) => {
15    return (
16      <Box
17        sx={{
18          display: 'flex',
19          alignItems: 'center',
20          justifyContent: 'center',
21          flexDirection: 'column',
22        }}
23      >
24        <Switch
25          onClick={enableAsCollateral}
26          disableRipple
27          checked={enabledAsCollateral}
28          sx={{ mb: -1.5 }}
29        />
30        <IsolatedEnabledBadge />
31      </Box>
32    );
33  };