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

Proposal: Add "_____Styles" prop to compliment "___Props" and "____Ref" #417

Open
aVileBroker opened this issue Dec 14, 2022 · 1 comment
Labels
2 Story Points 2 Story Points enhancement New feature or request

Comments

@aVileBroker
Copy link
Contributor

aVileBroker commented Dec 14, 2022

This would make simple inline-styles more accessible. Right now if I want to add a center alignment to Text, I would need to do either:

const CenteredText = styled(Text.Container)`
  text-align: center;
`;

...

<Text StyledContainer={CenteredText}>Hello World</Text>

or

  <Text containerProps={{ style: { textAlign: 'center' }}}>Hello World</Text>

The proposed version would be:

  <Text containerStyles={{ textAlign: 'center' }}>Hello World</Text>
@aVileBroker aVileBroker added enhancement New feature or request 2 Story Points 2 Story Points labels Dec 14, 2022
@aVileBroker
Copy link
Contributor Author

I would think that the layering would be: (each one overwrites the previous one)

  1. Styled_____
  2. _____Styles
  3. styles attribute from ____Props

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 Story Points 2 Story Points enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant