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

don't have slot specific class attributes in the function component #8

Open
bcardarella opened this issue Nov 15, 2024 · 0 comments
Open

Comments

@bcardarella
Copy link
Member

Example, accordion. The documentation referes to header_class= and content_class=

Instead we should permit this:

<.accordion_set>
  <:header class="">
    DockYard StationUI Accodion
  </:header>
  <:content class="">
    Item 1
  </:content>
  <:content>
    Item 2
  </:content>
</.accordion_set>

So you can see that the slot :header and the slot :content both take the class attribute here and that is better than passing it into the top level function component. Here is how we did it for LVN:

https://github.com/liveview-native/liveview-client-swiftui/blob/main/priv/templates/lvn.swiftui.gen/core_components.ex#L614

and

https://github.com/liveview-native/liveview-client-swiftui/blob/main/priv/templates/lvn.swiftui.gen/core_components.ex#L622

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

No branches or pull requests

1 participant