From ac911da26989cde1d86d0c058e748e5c85c74ff6 Mon Sep 17 00:00:00 2001 From: 6h057 Date: Tue, 20 Sep 2022 19:59:48 +0000 Subject: [PATCH] [@mantine/core] Checkbox: add data-disabled + change color when disabled on label --- 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 && ( -