react-icons/ai#AiOutlineLink TypeScript Examples

The following examples show how to use react-icons/ai#AiOutlineLink. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DeploymentList.tsx    From portfolio with MIT License 6 votes vote down vote up
function DeploymentList(props: DeploymentListProps): React.ReactElement {
  const { deployment } = props;

  function renderList(type: string): React.ReactNode {
    const background = Colors[type];
    const link = deployment[type];

    return (
      <a
        className='mr-2 flex items-center rounded-sm px-2 py-1 text-xs font-medium text-white'
        href={link}
        style={{ background }}
        target='_blank'
        rel='noopener noreferrer'
      >
        <AiOutlineLink className='mr-1' size={15} />
        {type}
      </a>
    );
  }

  return (
    <div className='flex'>
      {React.Children.toArray(Object.keys(deployment).map(renderList))}
    </div>
  );
}