Skip to content

[FEATURE]: Allow LayoutProps to be used directly #135

@hirokazutei

Description

@hirokazutei

Currently, the layout prop is passed in like:

<Inset all={16} layout={{display: 'flex'}} />

However, it is also possible to have designed it so that we can:

<Inset all={16} display='flex' />

It is not a good idea to allow both since there will be more than one way to layout.
The second option was chosen since #134 is not yet available and I wanted to keep to focus of Inset to still be about spacing child element(s) from the elements that surround it. (And using ES6 spread directly into Inset tends to break flow... 😞)

But in the future, given #134's ability to choose strictness, the props might not be too overwhelming and it might be good to give users the choice to have Inset take props like the 2nd example.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions