Added pragmaFrag so terse Fragment syntax,<></>, can be used in Preact. (#9051)
This commit is contained in:
parent
83ba6b64c9
commit
9fc79cf034
2 changed files with 4 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { h, Component, Fragment } from 'preact';
|
||||
import { h, Component } from 'preact';
|
||||
import PropTypes from 'prop-types';
|
||||
import { generateMainImage } from '../actions';
|
||||
import { validateFileInputs } from '../../packs/validateFileInputs';
|
||||
|
|
@ -75,7 +75,7 @@ export class ArticleCoverImage extends Component {
|
|||
<Spinner /> Uploading...
|
||||
</span>
|
||||
) : (
|
||||
<Fragment>
|
||||
<>
|
||||
<Button variant="outlined" className="mr-2 whitespace-nowrap">
|
||||
<label htmlFor="cover-image-input">{uploadLabel}</label>
|
||||
<input
|
||||
|
|
@ -95,7 +95,7 @@ export class ArticleCoverImage extends Component {
|
|||
Remove
|
||||
</Button>
|
||||
)}
|
||||
</Fragment>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
{uploadError && (
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ module.exports = function (api) {
|
|||
'@babel/plugin-transform-react-jsx',
|
||||
{
|
||||
pragma: 'h',
|
||||
pragmaFrag: '"Fragment"',
|
||||
},
|
||||
],
|
||||
].filter(Boolean),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue