Skip to content

Commit 0dd3e16

Browse files
authored
fix: update to use the old JSX transform (#2513)
* chore: downgrade to minimum React version for build * fix: update to use the old JSX transform * fix: fix linting * Create rich-peas-try.md * Update rich-peas-try.md
1 parent 612d6c2 commit 0dd3e16

26 files changed

+30
-1
lines changed

.changeset/rich-peas-try.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@aws-amplify/ui-react": patch
3+
---
4+
5+
fix: update to use the old JSX transform to support app running on React prior to 16.14.0 where the new JSX transform does not get backported

packages/react/scripts/generateIcons.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const iconNames = [];
88

99
const template = ({ iconName, source }) => {
1010
return `import classNames from 'classnames';
11+
import * as React from 'react';
1112
1213
import { ComponentClassNames } from '../../shared';
1314
import { View } from '../../View';

packages/react/src/components/ThemeProvider/__tests__/ThemeProvider.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { render, screen } from '@testing-library/react';
22
import { Theme } from '@aws-amplify/ui';
3+
import * as React from 'react';
34

45
import { ThemeProvider } from '../index';
56
import { Heading } from '../../../primitives';

packages/react/src/hooks/__tests__/useTheme.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { createTheme, WebTheme } from '@aws-amplify/ui';
22
import { renderHook } from '@testing-library/react-hooks';
33
import { AmplifyProvider } from '../../components/ThemeProvider';
44
import { useTheme } from '../useTheme';
5+
import * as React from 'react';
56

67
const serializeTheme = (theme: WebTheme) => JSON.stringify(theme, null, 2);
78

packages/react/src/primitives/Icon/icons/IconAdd.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import classNames from 'classnames';
2+
import * as React from 'react';
23

34
import { ComponentClassNames } from '../../shared';
45
import { View } from '../../View';

packages/react/src/primitives/Icon/icons/IconCheck.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import classNames from 'classnames';
2+
import * as React from 'react';
23

34
import { ComponentClassNames } from '../../shared';
45
import { View } from '../../View';

packages/react/src/primitives/Icon/icons/IconCheckCircle.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import classNames from 'classnames';
2+
import * as React from 'react';
23

34
import { ComponentClassNames } from '../../shared';
45
import { View } from '../../View';

packages/react/src/primitives/Icon/icons/IconCheckCircleOutline.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import classNames from 'classnames';
2+
import * as React from 'react';
23

34
import { ComponentClassNames } from '../../shared';
45
import { View } from '../../View';

packages/react/src/primitives/Icon/icons/IconChevronLeft.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import classNames from 'classnames';
2+
import * as React from 'react';
23

34
import { ComponentClassNames } from '../../shared';
45
import { View } from '../../View';

packages/react/src/primitives/Icon/icons/IconChevronRight.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import classNames from 'classnames';
2+
import * as React from 'react';
23

34
import { ComponentClassNames } from '../../shared';
45
import { View } from '../../View';

0 commit comments

Comments
 (0)