Heed review comments

This commit is contained in:
René Pfeuffer
2020-06-24 17:05:22 +02:00
parent c5a2d04789
commit 0623f039cc
2 changed files with 2 additions and 14 deletions

View File

@@ -25,21 +25,13 @@ import React, { FC } from "react";
import Icon from "../Icon";
type Props = {
onChange?: (value: boolean) => void;
checked: boolean;
indeterminate?: boolean;
disabled?: boolean;
label?: string;
};
const TriStateCheckbox: FC<Props> = ({ onChange, checked, indeterminate, disabled, label }) => {
const onCheckboxChange = () => {
if (onChange) {
console.log("clickediclick");
onChange(!checked);
}
};
const TriStateCheckbox: FC<Props> = ({ checked, indeterminate, disabled, label }) => {
let icon;
if (indeterminate) {
icon = "minus-square";
@@ -60,7 +52,7 @@ const TriStateCheckbox: FC<Props> = ({ onChange, checked, indeterminate, disable
if (disabled) {
color = "grey-light";
} else if (checked || indeterminate) {
color = "blue";
color = "link";
} else {
color = "black";
}