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

Create specific container for single-child usecase #70

Closed
emilsjolander opened this issue Apr 12, 2017 · 0 comments
Closed

Create specific container for single-child usecase #70

emilsjolander opened this issue Apr 12, 2017 · 0 comments

Comments

@emilsjolander
Copy link
Contributor

Row and Column are great APIs as they make the direction of the container explicit. However this causes some confusion when wanting a container with only a single child as both Row and Column will work. Therefor we would like to introduce some Container.Builder type which only accepts one child (possibly only 1 relative positioned child and however many absolute children).

I can think of two possible APIs:

SingleChildContainer.create(c)
   .child(...)
   .child(...) // throws exception
   ...;

or

MyComponent.create(c)
   .prop1(...)
   .withContainer()
   ....;

Point of contact: @emilsjolander

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants