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

chore: RadioButtonPanelの内部ロジックをリファクタリングする #5267

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AtsushiM
Copy link
Member

関連URL

概要

変更内容

確認方法

@@ -10,7 +10,7 @@ type Props = ComponentProps<typeof RadioButton> & {
as?: string | React.ComponentType<any>
}

const MEANLESS_TAG_NAMES = ['div', 'span']
const MEANLESS_TAG_NAME_REGEX = /^(div|span)$/
Copy link
Member Author

Choose a reason for hiding this comment

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

配列と比較チェックするより、正規表現で一発でチェックするほうが高速のため、調整しました。
正規表現にすると読みづらくなる場合もありますが、今回は許容範囲かな、と思います

@AtsushiM AtsushiM changed the title chore: RadioButtonPanel chore: RadioButtonPanelの内部ロジックをリファクタリングする Jan 14, 2025
@yagimushi yagimushi force-pushed the chore-refactoring-RadioButtonPanel branch from 186fa53 to ae76d6b Compare January 14, 2025 01:11
@yagimushi yagimushi force-pushed the chore-refactoring-RadioButtonPanel branch from ae76d6b to d21ea53 Compare January 14, 2025 01:56
Copy link

pkg-pr-new bot commented Jan 14, 2025

Open in Stackblitz

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

commit: d21ea53

@AtsushiM AtsushiM marked this pull request as ready for review January 14, 2025 02:05
@AtsushiM AtsushiM requested a review from a team as a code owner January 14, 2025 02:05
@AtsushiM AtsushiM requested review from misako0927 and nabeliwo and removed request for a team January 14, 2025 02:05
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.

1 participant