Add ReactIcons (#149)

This commit is contained in:
Riccardo Graziosi
2022-08-22 10:38:03 +02:00
committed by GitHub
parent 4c73b398e8
commit 6198d814d8
32 changed files with 267 additions and 226 deletions

View File

@@ -0,0 +1,26 @@
import * as React from 'react';
interface Props {
onClick: React.MouseEventHandler<HTMLAnchorElement>;
icon?: React.ReactElement;
disabled?: boolean;
customClass?: string;
children: React.ReactNode;
}
const ActionLink = ({
onClick,
icon,
disabled = false,
customClass,
children,
}: Props) => (
<a
onClick={onClick}
className={`actionLink${disabled ? ' actionLinkDisabled' : ''}${customClass ? ' ' + customClass : ''}`}
>
{icon}{children}
</a>
);
export default ActionLink;