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):
![Screen Shot 2020-06-15 at 5 58 34 PM](https://user-images.githubusercontent.com/1571918/84720077-eba5ee80-af31-11ea-8c86-6a2c1d2a5e8f.png)
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