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

Enforce "accepts" property in named slots #163

Open
prevwong opened this issue Jun 17, 2024 · 0 comments
Open

Enforce "accepts" property in named slots #163

prevwong opened this issue Jun 17, 2024 · 0 comments

Comments

@prevwong
Copy link
Owner

prevwong commented Jun 17, 2024

Enforce slot accepts directive to only allow component of certain types to be used as slot children:

component Card() => (
  <div>
     <slot name="top" accepts={Button} />
 </div>
)

This will allow us to achieve similar drag and drop rules that exists in Craft currently

@prevwong prevwong converted this from a draft issue Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant