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

feat: multiple styles for components #370

Merged
merged 1 commit into from Jan 28, 2023
Merged

Conversation

qu3vipon
Copy link
Contributor

@qu3vipon qu3vipon commented Jan 28, 2023

Resolve: #353

looping through a list and overwriting earlier ones.

This renders a yellow box:

def index():
    return pc.box("box", style=[{"background_color": "orange"}, {"background_color": "yellow"}])

app = pc.App(state=State, style={pc.Box: {"background_color": "red"}})
app.add_page(index)
app.compile()

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.

Awesome!

@picklelo picklelo merged commit 5427dd0 into reflex-dev:main Jan 28, 2023
@qu3vipon qu3vipon deleted the feat/styles branch January 29, 2023 05:16
ACucos1 pushed a commit to ACucos1/rd-pynecone that referenced this pull request Feb 28, 2023
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.

Support multiple style dicts for components
2 participants