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

Add stretch property as shortcut for viewStyle={{ alignSelf: 'stretch' }} #40

Closed
SrBrahma opened this issue Mar 17, 2022 · 3 comments
Closed

Comments

@SrBrahma
Copy link
Owner

The viewStyle={{ alignSelf: 'stretch' }} is a common practice. Instead of typing all of that, a stretch property would improve the DX.

#7 (comment)

@SrBrahma
Copy link
Owner Author

Added in v7.0.0.

@Inna-Mykytiuk
Copy link

Sorry, but where i must to erite it? I don't understand it.
<Shadow
distance={15}
offset={[0, 4]}
viewStyle={{ alignSelf: 'stretch' }}
>
??

@SrBrahma
Copy link
Owner Author

SrBrahma commented May 6, 2023

Hi Inna! To use it, do the following:

<Shadow
  {...etc} // Other props you may want
  stretch
>

The stretch property is a shortcut for the viewStyle={{ alignSelf: 'stretch' }}, so, it's a quicker way to have this behavior.

Let me know if it is not yet clear!

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

No branches or pull requests

2 participants