From 301b35eece09548d38d60e4472cdc4ee18da2d47 Mon Sep 17 00:00:00 2001 From: splincode Date: Mon, 12 Aug 2024 16:51:49 +0300 Subject: [PATCH] fix(core): ignore pointer events for disabled button --- projects/core/components/button/button.style.less | 4 ++++ .../demo/src/modules/components/button/examples/1/index.less | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/projects/core/components/button/button.style.less b/projects/core/components/button/button.style.less index 98f6a1e9be397..420bae8ebb43d 100644 --- a/projects/core/components/button/button.style.less +++ b/projects/core/components/button/button.style.less @@ -18,6 +18,10 @@ outline: none; color: inherit; + &[disabled]:not(._loading) { + pointer-events: none; + } + &[data-shape='rounded'] { border-radius: 6.25rem; } diff --git a/projects/demo/src/modules/components/button/examples/1/index.less b/projects/demo/src/modules/components/button/examples/1/index.less index 0c88b9d3970a4..274519671655e 100644 --- a/projects/demo/src/modules/components/button/examples/1/index.less +++ b/projects/demo/src/modules/components/button/examples/1/index.less @@ -17,3 +17,8 @@ animation: rotating 1.5s linear infinite; } } + +button:hover, +a:hover { + outline: 2px solid var(--tui-accent-hover); +}