From fdfda2213c5a0edb6a7781481d3889226b805a5f Mon Sep 17 00:00:00 2001 From: Doeunnkimm Date: Thu, 22 Aug 2024 00:30:12 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20disabled=20=ED=98=B8=EB=B2=84=20?= =?UTF-8?q?=EC=8A=A4=ED=83=80=EC=9D=BC=20=EB=B0=8F=20active=20=EC=8A=A4?= =?UTF-8?q?=ED=83=80=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/app/test/page.tsx | 12 ------------ packages/core/sds/src/components/Button/styles.ts | 15 +++++++++++---- 2 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 apps/web/app/test/page.tsx diff --git a/apps/web/app/test/page.tsx b/apps/web/app/test/page.tsx deleted file mode 100644 index 7f2d9f9b..00000000 --- a/apps/web/app/test/page.tsx +++ /dev/null @@ -1,12 +0,0 @@ -'use client'; - -import { Button, Icon } from '@sds/components'; - -const Page = () => { - return ( - - ); -}; -export default Page; diff --git a/packages/core/sds/src/components/Button/styles.ts b/packages/core/sds/src/components/Button/styles.ts index 6255bd84..0c4e9d77 100644 --- a/packages/core/sds/src/components/Button/styles.ts +++ b/packages/core/sds/src/components/Button/styles.ts @@ -85,13 +85,20 @@ export const buttonCss = css({ cursor: 'pointer', - '&:hover': { - backgroundColor: `var(${buttonHoverColorVar})`, - }, - '&:disabled': { cursor: 'not-allowed', }, + + '@media (hover: none) and (pointer: coarse)': { + '&:not(:disabled):active': { + backgroundColor: `var(${buttonHoverColorVar})`, + }, + }, + '@media (hover: hover) and (pointer: fine)': { + '&:not(:disabled):hover': { + backgroundColor: `var(${buttonHoverColorVar})`, + }, + }, }); export const leftDecorCss = css({