From 68539a560a37c425a79dd6a11a955f3f986e8567 Mon Sep 17 00:00:00 2001 From: Jan Hassel Date: Fri, 1 May 2020 09:03:49 +0200 Subject: [PATCH 1/2] fix(tag): pass props.disabled to close button --- packages/components/src/components/tag/_tag.scss | 4 ++++ packages/react/src/components/Tag/Tag.js | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/components/src/components/tag/_tag.scss b/packages/components/src/components/tag/_tag.scss index 9ab011892b73..6b94634fde95 100644 --- a/packages/components/src/components/tag/_tag.scss +++ b/packages/components/src/components/tag/_tag.scss @@ -171,6 +171,10 @@ background-color: transparent; border-radius: 50%; cursor: pointer; + + &:disabled { + cursor: not-allowed; + } } .#{$prefix}--tag__close-icon:focus { diff --git a/packages/react/src/components/Tag/Tag.js b/packages/react/src/components/Tag/Tag.js index de34697bbdd3..c442bb7a2d6e 100644 --- a/packages/react/src/components/Tag/Tag.js +++ b/packages/react/src/components/Tag/Tag.js @@ -66,6 +66,7 @@ const Tag = ({ From 1c0c57cf30906931c9c3452640f8ab8146912829 Mon Sep 17 00:00:00 2001 From: Jan Hassel Date: Mon, 4 May 2020 18:11:19 +0200 Subject: [PATCH 2/2] fix(tag): un-nest disabled style --- packages/components/src/components/tag/_tag.scss | 6 +++--- packages/react/src/components/Tag/Tag.js | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/components/src/components/tag/_tag.scss b/packages/components/src/components/tag/_tag.scss index 6b94634fde95..f820321c970d 100644 --- a/packages/components/src/components/tag/_tag.scss +++ b/packages/components/src/components/tag/_tag.scss @@ -171,10 +171,10 @@ background-color: transparent; border-radius: 50%; cursor: pointer; + } - &:disabled { - cursor: not-allowed; - } + .#{$prefix}--tag--disabled .#{$prefix}--tag__close-icon { + cursor: not-allowed; } .#{$prefix}--tag__close-icon:focus { diff --git a/packages/react/src/components/Tag/Tag.js b/packages/react/src/components/Tag/Tag.js index c442bb7a2d6e..eb149c2d8782 100644 --- a/packages/react/src/components/Tag/Tag.js +++ b/packages/react/src/components/Tag/Tag.js @@ -58,7 +58,6 @@ const Tag = ({ : `Clear filter ${children}` } id={tagId} - disabled={disabled} {...other}> {children !== null && children !== undefined ? children : TYPES[type]}