Remove onClick option from Icon.tsx

This commit is contained in:
Florian Scholdei
2020-04-20 00:44:52 +02:00
parent 0a7c847c56
commit 3ab3eb43bd
3 changed files with 5 additions and 20 deletions

View File

@@ -30,7 +30,6 @@ type Props = {
name: string;
color: string;
className?: string;
onClick?: () => void;
};
export default class Icon extends React.Component<Props> {
@@ -40,16 +39,12 @@ export default class Icon extends React.Component<Props> {
};
render() {
const { title, iconStyle, name, color, className, onClick } = this.props;
const { title, iconStyle, name, color, className } = this.props;
if (title) {
return (
<i
title={title}
className={classNames(iconStyle, "fa-fw", "fa-" + name, `has-text-${color}`, className)}
onClick={onClick}
/>
<i title={title} className={classNames(iconStyle, "fa-fw", "fa-" + name, `has-text-${color}`, className)} />
);
}
return <i className={classNames(iconStyle, "fa-" + name, `has-text-${color}`, className)} onClick={onClick} />;
return <i className={classNames(iconStyle, "fa-" + name, `has-text-${color}`, className)} />;
}
}