You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when I put a space after the first styleName attribute only...
<ulclassName="justify-content-center"styleName="pagination">{/* Note the space before the closing angle bracket*/}<listyleName={`page-item${isFirstPage ? " disabled" : ""}`}><astyleName="page-link"href={`${basePath}/1`}aria-label="First"><spanaria-hidden="true">«</span><spanclassName="sr-only">First</span></a></li></ul>
all styleNames generate their corresponding classNames.
In another instance, the styleName attribute was not able to be converted over because there wasn't a space before a self-closing <img> tag. (i.e. <img src="..."/> vs. <img src="..." />) Adding the space before self-closing the tag enabled the styleName to generate the className.
Edit: A temporary workaround for the issue I'm having is to position the styleName attribute such that it isn't the last one in the DOM element. This ensures that there is a space after the attribute. This will not work if the styleName is the only attribute in the element.
Activity
darylwright commentedon Jun 23, 2020
I'm also experiencing this issue, however, the classes get generated when there is whitespace after the styleName attribute.
This JSX code...
... produces this DOM structure.
However, when I put a space after the first
styleNameattribute only...all
styleNames generate their correspondingclassNames.In another instance, the
styleNameattribute was not able to be converted over because there wasn't a space before a self-closing<img>tag. (i.e.<img src="..."/>vs.<img src="..." />) Adding the space before self-closing the tag enabled thestyleNameto generate theclassName.Edit: A temporary workaround for the issue I'm having is to position the
styleNameattribute such that it isn't the last one in the DOM element. This ensures that there is a space after the attribute. This will not work if thestyleNameis the only attribute in the element.