From 88168cb157bf7cb405561518927774d843573663 Mon Sep 17 00:00:00 2001 From: dominik-zeglen Date: Mon, 17 Aug 2020 13:42:37 +0200 Subject: [PATCH] wip --- src/components/ControlledCheckbox.tsx | 4 +--- src/icons/Checkbox.tsx | 11 +++++++++++ src/theme.ts | 5 +++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 src/icons/Checkbox.tsx diff --git a/src/components/ControlledCheckbox.tsx b/src/components/ControlledCheckbox.tsx index ebace41f9..fd4d57b45 100644 --- a/src/components/ControlledCheckbox.tsx +++ b/src/components/ControlledCheckbox.tsx @@ -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 = ({ checked={checked} disabled={disabled} name={name} - disableClickPropagation onChange={() => onChange({ target: { name, value: !checked } })} /> } diff --git a/src/icons/Checkbox.tsx b/src/icons/Checkbox.tsx new file mode 100644 index 000000000..e9ea53fea --- /dev/null +++ b/src/icons/Checkbox.tsx @@ -0,0 +1,11 @@ +import createSvgIcon from "@material-ui/icons/utils/createSvgIcon"; +import React from "react"; + +const ArrowSort = createSvgIcon( + <> + + , + "ArrowSort" +); + +export default ArrowSort; diff --git a/src/theme.ts b/src/theme.ts index bddcd3d94..78398b8f6 100644 --- a/src/theme.ts +++ b/src/theme.ts @@ -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" +};