From c4da3773772418a6c988660fc8737d87baf96da9 Mon Sep 17 00:00:00 2001 From: ekachxaidze98 <65679299+ekachxaidze98@users.noreply.github.com> Date: Fri, 24 Nov 2023 15:06:22 +0400 Subject: [PATCH] CORE-4661 swith disable (#647) --- src/elements/switch/switch.css | 4 ++++ src/elements/switch/switch.jsx | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/elements/switch/switch.css b/src/elements/switch/switch.css index 59626b62..20207c47 100644 --- a/src/elements/switch/switch.css +++ b/src/elements/switch/switch.css @@ -76,3 +76,7 @@ margin-left: 1rem; font-size: var(--label-font-size); } + +.non-active { + cursor: not-allowed; +} diff --git a/src/elements/switch/switch.jsx b/src/elements/switch/switch.jsx index aa86a83e..ef2603c1 100644 --- a/src/elements/switch/switch.jsx +++ b/src/elements/switch/switch.jsx @@ -11,6 +11,8 @@ const Switch = ({ name = id, checked, onChange, + // eslint-disable-next-line react/prop-types + nonActive = false, label, className, ...props @@ -34,6 +36,7 @@ const Switch = ({