addon-jsx
addon-jsx copied to clipboard
prevent break line of array props value
Hi!
Is there any way to prevent the react-element-to-jsx-string
to breaking lines on an array value props? Bellow follows an example:
Input code
<Row>
<Cell>
<Block>[1, 2, 3, 4, 6, 12]</Block>
</Cell>
<Cell size={[8, 2, 3, 4, 6, 6]}>
<Block>[8, 2, 3, 4, 6, 6]</Block>
</Cell>
<Cell size={[null, null, null, null, null, 6]}>
<Block>[1, 2, 3, 4, 6, 6]</Block>
</Cell>
<Cell size={[2]}>
<Block>[2, 2, 3, 4, 6, 12]</Block>
</Cell>
</Row>
Output formatted code
<Row>
<Cell>
<Block>
[1, 2, 3, 4, 6, 12]
</Block>
</Cell>
<Cell
size={[
8,
2,
3,
4,
6,
6
]}
>
<Block>
[8, 2, 3, 4, 6, 6]
</Block>
</Cell>
<Cell
size={[
null,
null,
null,
null,
null,
6
]}
>
<Block>
[1, 2, 3, 4, 6, 6]
</Block>
</Cell>
<Cell
size={[
2
]}
>
<Block>
[2, 2, 3, 4, 6, 12]
</Block>
</Cell>
</Row>
This seems to be a problem upstream with https://github.com/algolia/react-element-to-jsx-string/