ui-kit icon indicating copy to clipboard operation
ui-kit copied to clipboard

Provide new component Flex

Open ahmehri opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe.

Context: https://github.com/commercetools/ui-kit/pull/557#issuecomment-815927709

My use case is positioning two items vertically with a container that has a fixed height, and position them in a way that there is a space between them.

114188919-e7781100-9949-11eb-93d2-6af9a00a29da

This is not possible to implement right now with ui-kit components.

Describe the solution you'd like

A new component Flex (similar to the existing component Grid) can solve the problem here.

Describe alternatives you've considered

Using the component Spacings.Stack should solve the problem, except the CSS property justify-content is not supported. It turned out that even if it was supported, the problem won't be solved because the container needs to have a fixed height (which means a new prop height should be added too).

This is not a good idea after all because spacing components are not the same as Flexbox containers. Yes, they internally use Flexbox but they aim to solve a specific use case.

ahmehri avatar Apr 12 '21 08:04 ahmehri