gajus/babel-plugin-react-css-modules

Classnames have trailing whitespace when spread is used

Aperta

#262 aperta il 30 giu 2019

 (3 commenti) (4 reazioni) (0 assegnatari)JavaScript (159 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (2034 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Example: JSX:

<div styleName="classA classB" {...someProps} />

Output:

<div className="classA classB " />

No trailing whitespace is added when spread is not used.

Seems like a small issue, but it breaks snapshots or className checks in tests when upgrading.

Guida contributor