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

add in rx.el.style #3511

Merged
merged 3 commits into from
Jun 20, 2024
Merged

add in rx.el.style #3511

merged 3 commits into from
Jun 20, 2024

Conversation

tgberkeley
Copy link
Collaborator

Adding rx.el.style component.

Tested with this example that works:

rx.el.style(
    """
    .custom-text {
        color: white;
        background-color: blue;
        padding: 5px;
        border: 1px solid black;
    }
    """
),
rx.el.style(
    """
    .responsive-text {
        color: blue;
        background-color: yellow;
    }
    
    """,
    media="all and (max-width: 700px)"
),
rx.text("This is my paragraph.", class_name="custom-text responsive-text")

The ordering of the rx.el.style components in the python code is important and can change the look of the output.

@tgberkeley tgberkeley requested a review from masenf June 17, 2024 19:15
Copy link
Contributor

@picklelo picklelo left a comment

Choose a reason for hiding this comment

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

Looks good - just need to run the pyi generator

Tom Gotsman and others added 2 commits June 18, 2024 10:42
@tgberkeley tgberkeley requested a review from picklelo June 19, 2024 21:01
@tgberkeley
Copy link
Collaborator Author

In the pyi file it has imported Style when the class is now named StyleEl due to a naming conflict. Is this correct?

@picklelo picklelo merged commit a4a5d52 into main Jun 20, 2024
47 checks passed
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