From 2c1b3dd6b80044a2536586d312603a37db98f089 Mon Sep 17 00:00:00 2001
From: 6h057 <15034695+omarsy@users.noreply.github.com>
Date: Sat, 24 Sep 2022 09:07:54 +0200
Subject: [PATCH] [@mantine/core] Checkbox: add data-disabled + change color
when disabled on label (#2508)
---
src/mantine-core/src/Checkbox/Checkbox.styles.ts | 3 +++
src/mantine-core/src/Checkbox/Checkbox.tsx | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/mantine-core/src/Checkbox/Checkbox.styles.ts b/src/mantine-core/src/Checkbox/Checkbox.styles.ts
index 95c22a316b8..e33d0697030 100644
--- a/src/mantine-core/src/Checkbox/Checkbox.styles.ts
+++ b/src/mantine-core/src/Checkbox/Checkbox.styles.ts
@@ -71,6 +71,9 @@ export default createStyles(
lineHeight: `${_size}px`,
color: theme.colorScheme === 'dark' ? theme.colors.dark[0] : theme.black,
cursor: theme.cursorType,
+ '&[data-disabled]': {
+ color: theme.colorScheme === 'dark' ? theme.colors.dark[3] : theme.colors.gray[5],
+ },
},
input: {
diff --git a/src/mantine-core/src/Checkbox/Checkbox.tsx b/src/mantine-core/src/Checkbox/Checkbox.tsx
index b77f4a4ad25..7a62e7e06f9 100644
--- a/src/mantine-core/src/Checkbox/Checkbox.tsx
+++ b/src/mantine-core/src/Checkbox/Checkbox.tsx
@@ -67,6 +67,7 @@ export const Checkbox: CheckboxComponent = forwardRef
@@ -121,7 +123,7 @@ export const Checkbox: CheckboxComponent = forwardRef
{label && (
-