mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 23:15:43 +01:00
improved footer layout
This commit is contained in:
30
scm-ui/ui-components/src/navigation/ExternalLink.tsx
Normal file
30
scm-ui/ui-components/src/navigation/ExternalLink.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import React, { FC } from "react";
|
||||
import classNames from "classnames";
|
||||
|
||||
type Props = {
|
||||
to: string;
|
||||
icon?: string;
|
||||
label: string;
|
||||
};
|
||||
|
||||
const ExternalLink: FC<Props> = ({ to, icon, label }) => {
|
||||
let showIcon;
|
||||
if (icon) {
|
||||
showIcon = (
|
||||
<>
|
||||
<i className={classNames(icon, "fa-fw")} />{" "}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<li>
|
||||
<a target="_blank" href={to}>
|
||||
{showIcon}
|
||||
{label}
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
};
|
||||
|
||||
export default ExternalLink;
|
||||
Reference in New Issue
Block a user