From 0b00bf36c953c9ae13d7a715d34ea5e932a0e48d Mon Sep 17 00:00:00 2001 From: Vitaly Rtishchev Date: Wed, 16 Oct 2024 21:31:40 +0400 Subject: [PATCH] [@mantine/dropzone] Set `data-disabled` attribute on the root element if `disabled` prop is set (#6946) --- packages/@docs/styles-api/src/data/Dropzone.styles-api.ts | 1 + packages/@mantine/dropzone/src/Dropzone.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/@docs/styles-api/src/data/Dropzone.styles-api.ts b/packages/@docs/styles-api/src/data/Dropzone.styles-api.ts index 4c229372e11..70556240cc0 100644 --- a/packages/@docs/styles-api/src/data/Dropzone.styles-api.ts +++ b/packages/@docs/styles-api/src/data/Dropzone.styles-api.ts @@ -30,6 +30,7 @@ export const DropzoneStylesApi: StylesApiData = { }, { modifier: 'data-idle', selector: 'root', condition: 'Dropzone is idle' }, { modifier: 'data-loading', selector: 'root', condition: '`loading` prop is set' }, + { modifier: 'data-disabled', selector: 'root', condition: '`disabled` prop is set' }, { modifier: 'data-activate-on-click', selector: 'root', diff --git a/packages/@mantine/dropzone/src/Dropzone.tsx b/packages/@mantine/dropzone/src/Dropzone.tsx index 7efdb29b4e0..1bee9c31431 100644 --- a/packages/@mantine/dropzone/src/Dropzone.tsx +++ b/packages/@mantine/dropzone/src/Dropzone.tsx @@ -288,6 +288,7 @@ export const Dropzone = factory((_props, ref) => { accept: isDragAccept, reject: isDragReject, idle: isIdle, + disabled, loading, 'activate-on-click': activateOnClick, },