mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 15:05:44 +01:00
Heed review comments
This commit is contained in:
@@ -25,21 +25,13 @@ import React, { FC } from "react";
|
|||||||
import Icon from "../Icon";
|
import Icon from "../Icon";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
onChange?: (value: boolean) => void;
|
|
||||||
checked: boolean;
|
checked: boolean;
|
||||||
indeterminate?: boolean;
|
indeterminate?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
label?: string;
|
label?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const TriStateCheckbox: FC<Props> = ({ onChange, checked, indeterminate, disabled, label }) => {
|
const TriStateCheckbox: FC<Props> = ({ checked, indeterminate, disabled, label }) => {
|
||||||
const onCheckboxChange = () => {
|
|
||||||
if (onChange) {
|
|
||||||
console.log("clickediclick");
|
|
||||||
onChange(!checked);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
let icon;
|
let icon;
|
||||||
if (indeterminate) {
|
if (indeterminate) {
|
||||||
icon = "minus-square";
|
icon = "minus-square";
|
||||||
@@ -60,7 +52,7 @@ const TriStateCheckbox: FC<Props> = ({ onChange, checked, indeterminate, disable
|
|||||||
if (disabled) {
|
if (disabled) {
|
||||||
color = "grey-light";
|
color = "grey-light";
|
||||||
} else if (checked || indeterminate) {
|
} else if (checked || indeterminate) {
|
||||||
color = "blue";
|
color = "link";
|
||||||
} else {
|
} else {
|
||||||
color = "black";
|
color = "black";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,10 +160,6 @@ $danger-25: scale-color($danger, $lightness: 75%);
|
|||||||
color: $blue-light !important;
|
color: $blue-light !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.has-text-blue {
|
|
||||||
color: $blue !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
// border and background colors
|
// border and background colors
|
||||||
.has-background-dark-75 {
|
.has-background-dark-75 {
|
||||||
background-color: $dark-75;
|
background-color: $dark-75;
|
||||||
|
|||||||
Reference in New Issue
Block a user