Skip to content

Commit a7dd671

Browse files
author
Marcella Malune
committed
refactor Checkbox component [Epic: Implement UI library #6374]
1 parent 23a735d commit a7dd671

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

src/components/Checkbox.tsx

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from "react"
22
import { Box, VisuallyHiddenInput, Text } from "@chakra-ui/react"
33

4-
// Props
54
export interface IProps {
65
children?: React.ReactNode
76
callback?: () => void
@@ -10,7 +9,6 @@ export interface IProps {
109
size?: number
1110
}
1211

13-
// Checkbox
1412
const Checkbox: React.FC<IProps> = ({
1513
callback,
1614
checked,
@@ -19,17 +17,6 @@ const Checkbox: React.FC<IProps> = ({
1917
size = 2,
2018
...rest
2119
}) => {
22-
console.log({
23-
checkboxProps: {
24-
callback,
25-
checked,
26-
children,
27-
className,
28-
size,
29-
...rest,
30-
},
31-
})
32-
3320
const handleClick = () => {
3421
if (callback) {
3522
callback()
@@ -58,14 +45,14 @@ const Checkbox: React.FC<IProps> = ({
5845
h: `${size}rem`,
5946
minW: `${size}rem`,
6047
bg: `${checked ? "primary400" : "background"}`,
61-
border: "px",
48+
border: "1px",
6249
borderStyle: "solid",
6350
borderColor: "black50",
6451
borderRadius: "3px",
6552
transition: "all 150ms",
6653
_hover: {
6754
boxShadow: "tableItemBoxShadow",
68-
border: "px",
55+
border: "1px",
6956
borderStyle: "solid",
7057
borderColor: "primary600",
7158
transition: "transform 0.1s",
@@ -81,7 +68,7 @@ const Checkbox: React.FC<IProps> = ({
8168
viewBox="0 0 24 24"
8269
fill="none"
8370
stroke="white"
84-
strokeWidth={0.5}
71+
strokeWidth="2px"
8572
visibility={`${checked ? "visible" : "hidden"}`}
8673
>
8774
<polyline points="20 6 9 17 4 12" />

0 commit comments

Comments
 (0)