Shopify / restyle

A type-enforced system for building UI components in React Native with TypeScript.
https://shopify.github.io/restyle/
MIT License
2.86k stars 128 forks source link

Add layout props to createText function #262

Closed robrechtme closed 3 months ago

robrechtme commented 1 year ago

Description

The RN Text component supports layout styles like flex and maxWidth these are commonly used, especially flex={1} for layouting and therefore useful to be exposed as props.

Reviewers’ hat-rack :tophat:

Screenshots or videos (if needed)

Checklist

robrechtme commented 10 months ago

Hi @mattfrances @JoelBesada this one has been open for a while, any chance it can be reviewed? 😇 Thanks!

mattfrances commented 10 months ago

Hi @mattfrances @JoelBesada this one has been open for a while, any chance it can be reviewed? 😇 Thanks!

Hi, thanks for the tag! Are there any use cases where you cannot achieve the same result by adding flex and maxWidth to a parent Box wrapping the Text?

robrechtme commented 10 months ago

Hmm not that I can think of actually 🤔 But it wouldn't hurt to expose these, since they are valid styles, no?

mattfrances commented 9 months ago

Hmm not that I can think of actually 🤔 But it wouldn't hurt to expose these, since they are valid styles, no?

Agreed! Please add a changelog entry in the CHANGELOG.md file under the "Next" section and we can get this merged

AronBe commented 4 months ago

Hey guys, thanks for your work. Seems like this has been approved some time ago, is it possible to get it merged?

robrechtme commented 4 months ago

Hi

Sorry I've forgotten about this. I've added a changelog so this is ready to be merged!