This commit is contained in:
dominik-zeglen 2020-08-17 13:42:37 +02:00
parent cc2fb0ae4e
commit 88168cb157
3 changed files with 17 additions and 3 deletions

View file

@ -1,8 +1,7 @@
import Checkbox from "@material-ui/core/Checkbox";
import FormControlLabel from "@material-ui/core/FormControlLabel";
import React from "react";
import Checkbox from "./Checkbox";
interface ControlledCheckboxProps {
className?: string;
name: string;
@ -27,7 +26,6 @@ export const ControlledCheckbox: React.FC<ControlledCheckboxProps> = ({
checked={checked}
disabled={disabled}
name={name}
disableClickPropagation
onChange={() => onChange({ target: { name, value: !checked } })}
/>
}

11
src/icons/Checkbox.tsx Normal file
View file

@ -0,0 +1,11 @@
import createSvgIcon from "@material-ui/icons/utils/createSvgIcon";
import React from "react";
const ArrowSort = createSvgIcon(
<>
<rect x="0.5" y="0.5" width="13" height="13" stroke="#616161" />
</>,
"ArrowSort"
);
export default ArrowSort;

View file

@ -1,4 +1,5 @@
import Card from "@material-ui/core/Card";
import Checkbox from "@material-ui/core/Checkbox";
import { createMuiTheme, Theme } from "@material-ui/core/styles";
import { darken, fade } from "@material-ui/core/styles/colorManipulator";
import TextField from "@material-ui/core/TextField";
@ -562,3 +563,7 @@ Card.defaultProps = {
Typography.defaultProps = {
component: "div"
};
Checkbox.defaultProps = {
color: "primary"
};