github.com/argoproj/argo-cd/v2@v2.10.9/ui/src/app/shared/components/deep-links.tsx (about)

     1  import React from 'react';
     2  import {Link} from 'react-router-dom';
     3  import {LinkInfo} from '../models';
     4  
     5  export const DeepLinks = (props: {links: LinkInfo[]}) => {
     6      const {links} = props;
     7      return (
     8          <div style={{margin: '10px 0'}}>
     9              {(links || []).map((link: LinkInfo) => (
    10                  <div key={link.title} style={{display: 'flex', alignItems: 'center', height: '35px'}}>
    11                      {link.url.startsWith('http') ? (
    12                          <a href={link.url} target='_blank' rel='noopener' style={{display: 'flex', alignItems: 'center', marginRight: '7px'}}>
    13                              <i className={`fa ${link.iconClass ? link.iconClass : 'fa-external-link-alt'} custom-style-link`} style={{marginRight: '5px'}} />
    14                              <div>{link.title}</div>
    15                          </a>
    16                      ) : (
    17                          <Link to={link.url} style={{display: 'flex', alignItems: 'center', marginRight: '7px'}}>
    18                              <i className={`fa ${link.iconClass ? link.iconClass : 'fa-external-link-alt'}`} style={{marginRight: '5px'}} />
    19                              <div>{link.title}</div>
    20                          </Link>
    21                      )}
    22                      {link.description && <>({link.description})</>}
    23                  </div>
    24              ))}
    25          </div>
    26      );
    27  };