From 772e44cade84def64fc3432798d705b67fb62eb8 Mon Sep 17 00:00:00 2001 From: Dan Berry <06berrydan@gmail.com> Date: Mon, 20 May 2024 23:37:19 +0100 Subject: [PATCH] [core] fix: do not colour FormGroup sub label based on intent (#6811) Co-authored-by: svc-changelog --- packages/core/changelog/@unreleased/pr-6811.v2.yml | 5 +++++ packages/core/src/components/forms/_form-group.scss | 2 -- packages/core/src/components/forms/formGroup.tsx | 3 +-- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 packages/core/changelog/@unreleased/pr-6811.v2.yml diff --git a/packages/core/changelog/@unreleased/pr-6811.v2.yml b/packages/core/changelog/@unreleased/pr-6811.v2.yml new file mode 100644 index 0000000000..70d1faf20e --- /dev/null +++ b/packages/core/changelog/@unreleased/pr-6811.v2.yml @@ -0,0 +1,5 @@ +type: improvement +improvement: + description: Do not colour FormGroup sub label based on intent + links: + - https://github.com/palantir/blueprint/pull/6811 diff --git a/packages/core/src/components/forms/_form-group.scss b/packages/core/src/components/forms/_form-group.scss index afd7db4177..ce6e7825b5 100644 --- a/packages/core/src/components/forms/_form-group.scss +++ b/packages/core/src/components/forms/_form-group.scss @@ -62,7 +62,6 @@ Styleguide form-group /* stylelint-disable-next-line order/declaration-block-order */ @each $intent, $color in $pt-intent-text-colors { &.#{$ns}-intent-#{$intent} { - .#{$ns}-form-group-sub-label, .#{$ns}-form-helper-text { color: $color; } @@ -102,7 +101,6 @@ Styleguide form-group .#{$ns}-dark & { @each $intent, $color in $pt-dark-intent-text-colors { &.#{$ns}-intent-#{$intent} { - .#{$ns}-form-group-sub-label, .#{$ns}-form-helper-text { color: $color; } diff --git a/packages/core/src/components/forms/formGroup.tsx b/packages/core/src/components/forms/formGroup.tsx index 8e7c655253..2694b3ef76 100644 --- a/packages/core/src/components/forms/formGroup.tsx +++ b/packages/core/src/components/forms/formGroup.tsx @@ -76,8 +76,7 @@ export interface FormGroupProps extends IntentProps, Props { /** * Optional text for `label`. The given content will be wrapped in - * `Classes.FORM_GROUP_SUB_LABEL` and displayed beneath `label`. The text color - * is determined by the `intent`. + * `Classes.FORM_GROUP_SUB_LABEL` and displayed beneath `label`. */ subLabel?: React.ReactNode; }