Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: SegmentedControl内の選択済み項目でButton[variant=primary]を利用する #5310

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

neet
Copy link
Collaborator

@neet neet commented Jan 21, 2025

関連URL

概要

SegmentedControl コンポーネントにおいて、チェック済みの項目をホバーしたときの背景色と前景色のカラーコントラスト比が不十分でした。そのため、選択済みの場合は、内部で利用されている Button コンポーネントで variant=primary を利用するように変更しました。

これによって、選択済み項目で shr-bg-main-darken が当たるようになり、十分なコントラスト比が確保されます。

変更内容

before after
image image

確認方法

https://www.chromatic.com/build?appId=63d0ccabb5d2dd29825524ab&number=10084

Copy link

pkg-pr-new bot commented Jan 21, 2025

Open in Stackblitz

npm i https://pkg.pr.new/kufu/smarthr-ui@5310

commit: 7a01c3f

@neet neet marked this pull request as ready for review January 30, 2025 03:41
@neet neet requested a review from a team as a code owner January 30, 2025 03:41
@neet neet requested review from oti and nabeliwo and removed request for a team January 30, 2025 03:41
Copy link
Contributor

@Qs-F Qs-F left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! disabledと未選択で差がついたのいいですね 👍

Copy link
Contributor

@oti oti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@neet neet merged commit d286b90 into master Feb 4, 2025
23 checks passed
@neet neet deleted the use-primary-variant-for-checked-segmented-control branch February 4, 2025 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants