foundry-ui icon indicating copy to clipboard operation
foundry-ui copied to clipboard

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

Open aVileBroker opened this issue 2 years ago • 1 comments

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 avatar Dec 14 '22 21:12 aVileBroker

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

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

aVileBroker avatar Dec 14 '22 21:12 aVileBroker