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

Support multiple slots #810

Closed
malmaud opened this issue Aug 16, 2024 · 0 comments · Fixed by #1145
Closed

Support multiple slots #810

malmaud opened this issue Aug 16, 2024 · 0 comments · Fixed by #1145
Assignees

Comments

@malmaud
Copy link
Contributor

malmaud commented Aug 16, 2024

Is your feature request related to a problem? Please describe.
I want to define content components that accept multiple arbitrary components. eg:

  • if i wanted to define a tab view where the user can pass in multiple arbitrary components for the different tabs
  • or a 'content with header' component where the content and header are each arbitrary user-supplied components

Describe the solution you'd like
Some way to pass arbitrary components as children or parameters to content components, not sure what the API should look like. Maybe something like

with header_and_body_component() as parent:
   with parent.header():
       me.text("my header")
   with parent.body():
       me.text("my body")
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 a pull request may close this issue.

2 participants