foundry-ui
foundry-ui copied to clipboard
Proposal: Add "_____Styles" prop to compliment "___Props" and "____Ref"
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>
I would think that the layering would be: (each one overwrites the previous one)
- Styled_____
- _____Styles
- styles attribute from ____Props