Shopify / restyle

A type-enforced system for building UI components in React Native with TypeScript.

Home Page:https://shopify.github.io/restyle/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Let Text component support flex prop

selbekk opened this issue · comments

Is there a way we can make the default Text-component support the flex prop?

Today, this doesn't work:

<Text flex="1">My text takes up all the space</Text>

But this does:

<Text style={{ flex: "1" }}>My text takes up all the space</Text>

Hey @selbekk
Thank you for the issue

Have you read this thread? #132 (comment)

layout is not included in textRestyleFunctions

For now instead, of using createText you can "manually" create your Text component to include the props you want.