addon-jsx
addon-jsx copied to clipboard
JSX formatting for component props
I have some components that accept a React.Node for props. Example (body, footer, etc):
It would be nice if they followed the 2-space indentation. If maintainers agree with this change, any pointers on implementing it would be appreciated-- thanks!
Expected formatting would be:
<Card
body={
<div>
<Typography color="textSecondary" gutterBottom>
Word of the Day
</Typography>
<Typography component="h2" variant="h5">
benevolent
</Typography>
<Typography color="textSecondary">adjective</Typography>
<Typography component="p" variant="body2">
well meaning and kindly.
</Typography>
</div>
}
footer={
<Button tooltip="" variant="text">
Learn More
</Button>
}
header="Trivial Knowledge"
/>
Def down for better formatting. maybe it's just getting lost somewhere along the way.
Only tip for dev is let's avoid adding prettier as a dep. Had to remove that and do the formatting myself in storybook-pretty-props because prettier/standalone is 1mb