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

convert text inside list_item to span and set icon display to inline #2860

Merged
merged 3 commits into from
Mar 15, 2024

Conversation

Lendemor
Copy link
Collaborator

rx.list_item(
    rx.text("Web app with Reflex: "),
    rx.icon("key"),
    rx.link("🔗 Reflex Site", href="https://reflex.dev/docs/"),
)

The above code will now behave the same as

rx.list_item(
    rx.text.span("Web app with Reflex:  "),
    rx.icon("key", display="inline),
    rx.link("🔗 Reflex Site", href="https://reflex.dev/docs/")
)

@Lendemor Lendemor requested a review from tgberkeley March 14, 2024 17:22
@Lendemor Lendemor self-assigned this Mar 14, 2024
masenf
masenf previously approved these changes Mar 14, 2024
Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

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

I like that this only applies to direct children... so if somebody did want the broken behavior, for whatever reason, they could wrap the contents in an rx.fragment to bypass this prop forcing

Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

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

CI issues are known problems that are fixed in main; will merge

@masenf masenf merged commit 1048f86 into main Mar 15, 2024
60 of 62 checks passed
@picklelo picklelo deleted the lendemor/fix_text_inside_list_item branch August 21, 2024 20:42
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.

2 participants