/ src / components / BridgeButton.tsx
BridgeButton.tsx
 1  import { ExternalLinkIcon } from '@heroicons/react/outline';
 2  import { Button, SvgIcon, Typography } from '@mui/material';
 3  
 4  import { NetworkConfig } from '../ui-config/networksConfig';
 5  import { Link } from './primitives/Link';
 6  
 7  export const BridgeButton = ({ bridge }: Pick<NetworkConfig, 'bridge'>) => {
 8    if (!bridge) return null;
 9  
10    return (
11      <Button
12        startIcon={<img src={bridge.icon} alt={bridge.name} style={{ width: 14, height: 14 }} />}
13        endIcon={
14          <SvgIcon sx={{ width: 14, height: 14 }}>
15            <ExternalLinkIcon />
16          </SvgIcon>
17        }
18        component={Link}
19        size="small"
20        variant="outlined"
21        href={bridge.url || ''}
22      >
23        <Typography variant="buttonS">{bridge.name}</Typography>
24      </Button>
25    );
26  };