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_style api #3202

Merged
merged 13 commits into from
May 6, 2024
Merged

add_style api #3202

merged 13 commits into from
May 6, 2024

Conversation

Lendemor
Copy link
Collaborator

@Lendemor Lendemor commented May 1, 2024

code to test accordion, who use the new API along with data- vars from radix-ui

items = [
    rx.accordion.item(header="Item 1", content=rx.text("Item 1 content")),
    rx.accordion.item(header="Item 2", content=rx.text("Item 2 content")),
    rx.accordion.item(header="Item 3", content=rx.text("Item 3 content")),
]


@rx.page()
def index():
    return (
        rx.vstack(
            rx.hstack(
                rx.text("soft"),
                rx.text("classic"),
                rx.text("outline"),
                rx.text("ghost"),
                rx.text("surface"),
                spacing="9",
            ),
            rx.hstack(
                rx.accordion.root(*items, variant="soft"),
                rx.accordion.root(*items, variant="classic"),
                rx.accordion.root(*items, variant="outline"),
                rx.accordion.root(*items, variant="ghost"),
                rx.accordion.root(*items, variant="surface"),
            ),
            align="center",
            justify="between",
        ),
        rx.color_mode.button(position="top-right"),
    )

@Lendemor Lendemor marked this pull request as ready for review May 2, 2024 16:00
@Lendemor
Copy link
Collaborator Author

Lendemor commented May 2, 2024

Need the pyi generator changes from #3186 before merging this

reflex/components/component.py Outdated Show resolved Hide resolved
reflex/components/core/foreach.py Outdated Show resolved Hide resolved
reflex/components/radix/primitives/accordion.py Outdated Show resolved Hide resolved
reflex/components/component.py Outdated Show resolved Hide resolved
reflex/app.py Outdated Show resolved Hide resolved
reflex/compiler/compiler.py Show resolved Hide resolved
reflex/components/component.py Outdated Show resolved Hide resolved
reflex/components/component.py Outdated Show resolved Hide resolved
reflex/components/component.py Show resolved Hide resolved
reflex/components/component.py Outdated Show resolved Hide resolved
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 to me

reflex/components/component.py Show resolved Hide resolved
@picklelo picklelo merged commit 5747696 into main May 6, 2024
45 of 46 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.

None yet

3 participants