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

[KaSelectbox] to use reactcomponent for img #27

Closed
wants to merge 2 commits into from

Conversation

sitongliu-klaytn
Copy link
Collaborator

refactor the Kaselectbox to accept ReactElement as img instead of only accepting img url string

@skqksh skqksh requested review from bokuhe and edwin082 January 13, 2025 05:22
@@ -194,7 +199,7 @@ const getLabelForValue = (
const getImgForValue = (
options: KaSelectBoxOptionListType[],
value: string,
): string | undefined => {
): React.ReactNode | undefined => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the return type can be either option.img or undefined, it seems fine to change it to string | ReactElement | undefined.

@skqksh
Copy link
Collaborator

skqksh commented Jan 15, 2025

merged this PR in here: #28

@skqksh skqksh closed this Jan 15, 2025
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.

4 participants