hirokazutei / hirokazutei/react-native-spacing-system

[FEATURE]: Allow LayoutProps to be used directly

Open
#135 0 comments 0 reactions 1 assignee Claimed by @hirokazutei View on GitHub
enhancement flow good first issue ts
Dominant language
TypeScript
Stars
42
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Currently, the `layout` prop is passed in like:
```tsx

```

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

```

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.