Skip to content

Commit

Permalink
Update react imports for react jsx.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouder committed Dec 10, 2024
1 parent 4d33ea5 commit 334b6f9
Show file tree
Hide file tree
Showing 24 changed files with 33 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ figma.connect(
Large: 'large',
}),
},
example: ({ type }) => <Spinner id="spinner" type={type} loadingText="Loading..." />,
example: ({ type }) => (
<Spinner id="spinner" type={type as 'small' | 'large'} loadingText="Loading..." />
),
},
);
2 changes: 1 addition & 1 deletion packages/comet-extras/src/components/spinner/spinner.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { JSX } from 'react';
import classnames from 'classnames';
import './spinner.style.css';

Expand Down
2 changes: 1 addition & 1 deletion packages/comet-uswds/src/components/button/button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode, SyntheticEvent } from 'react';
import React, { JSX, ReactNode, SyntheticEvent } from 'react';
import classnames from 'classnames';

export interface ButtonProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useRef } from 'react';
import React, { JSX, useEffect, useRef } from 'react';
import classNames from 'classnames';
import characterCount from '@uswds/uswds/js/usa-character-count';

Expand Down
2 changes: 1 addition & 1 deletion packages/comet-uswds/src/components/checkbox/checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ChangeEventHandler, MouseEventHandler } from 'react';
import React, { ChangeEventHandler, JSX, MouseEventHandler } from 'react';
import classnames from 'classnames';
import FormGroup from '../form-group';

Expand Down
9 changes: 8 additions & 1 deletion packages/comet-uswds/src/components/combo-box/combo-box.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { createOption, SelectOptionProps, SelectProps } from '../select/select';
import comboBox from '@uswds/uswds/js/usa-combo-box';
import React, { ChangeEventHandler, ReactElement, RefObject, useLayoutEffect, useRef } from 'react';
import React, {
ChangeEventHandler,
JSX,
ReactElement,
RefObject,
useLayoutEffect,
useRef,
} from 'react';
import FormGroup from '../form-group';
import classNames from 'classnames';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import datePicker from '@uswds/uswds/js/usa-date-picker';
import React, { useLayoutEffect, useRef } from 'react';
import React, { JSX, useLayoutEffect, useRef } from 'react';
import FormGroup from '../form-group';
import { ValidationStatus } from '../utils/types';
import classNames from 'classnames';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, RenderOptions, RenderResult } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { axe } from 'jest-axe';
import React, { ReactNode } from 'react';
import React, { JSX, ReactNode } from 'react';
import FileInput from './file-input';
const customRender = (ui: React.ReactElement, options?: RenderOptions): RenderResult =>
render(ui, { wrapper: Wrapper, ...options });
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fileInput from '@uswds/uswds/js/usa-file-input';
import React, { useLayoutEffect, useRef } from 'react';
import React, { JSX, useLayoutEffect, useRef } from 'react';
import FormGroup from '../form-group';

export interface FileInputProps {
Expand Down
1 change: 1 addition & 0 deletions packages/comet-uswds/src/components/form/form.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import classNames from 'classnames';
import { JSX } from 'react';

export interface FormProps {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/comet-uswds/src/components/label/label.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from 'react';
import React, { JSX, ReactNode } from 'react';

export interface LabelProps {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/comet-uswds/src/components/modal/modal.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, RenderOptions, RenderResult } from '@testing-library/react';
import { axe } from 'jest-axe';
import React, { ReactNode } from 'react';
import React, { JSX, ReactNode } from 'react';
import Modal from './modal';

const customRender = (ui: React.ReactElement, options?: RenderOptions): RenderResult =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode, SyntheticEvent } from 'react';
import React, { JSX, ReactNode, SyntheticEvent } from 'react';
import classNames from 'classnames';
import sprite from '@uswds/uswds/img/sprite.svg';

Expand Down
2 changes: 1 addition & 1 deletion packages/comet-uswds/src/components/prose/prose.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from 'react';
import React, { JSX, ReactNode } from 'react';
import classnames from 'classnames';

export interface ProseProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ChangeEventHandler, MouseEventHandler } from 'react';
import React, { ChangeEventHandler, JSX, MouseEventHandler } from 'react';
import classnames from 'classnames';
import FormGroup from '../form-group';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { JSX } from 'react';
import FormGroup from '../form-group';

export interface RangeSliderProps {
Expand Down
2 changes: 1 addition & 1 deletion packages/comet-uswds/src/components/search/search.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { FormEvent } from 'react';
import React, { FormEvent, JSX } from 'react';
import classnames from 'classnames';
import searchIcon from '@uswds/uswds/img/usa-icons-bg/search--white.svg';

Expand Down
2 changes: 1 addition & 1 deletion packages/comet-uswds/src/components/select/select.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import classNames from 'classnames';
import React, { ChangeEventHandler, ReactElement } from 'react';
import React, { ChangeEventHandler, JSX, ReactElement } from 'react';
import FormGroup from '../form-group';

export interface SelectOptionProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { JSX } from 'react';
import { Meta, StoryFn } from '@storybook/react';
import SideNavigation, {
SideNavigationItem,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { render } from '@testing-library/react';
import { axe } from 'jest-axe';
import SideNavigation, { SideNavigationItemProps } from './side-navigation';
import { JSX } from 'react';

describe('SideNavigation', () => {
const defaultId = 'side-navigation1';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactElement, ReactNode } from 'react';
import React, { JSX, ReactElement, ReactNode } from 'react';

export interface SideNavigationItemProps {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import classnames from 'classnames';
import React, { ChangeEventHandler } from 'react';
import React, { ChangeEventHandler, JSX } from 'react';
import { ValidationStatus } from '../utils/types';
import FormGroup from '../form-group';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ChangeEventHandler, ReactNode, useEffect, useRef } from 'react';
import React, { ChangeEventHandler, JSX, ReactNode, useEffect, useRef } from 'react';
import classnames from 'classnames';
import { getInputMode, getPattern, getPlaceholder, getType } from './input-utils';
import FormGroup from '../form-group';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import classNames from 'classnames';
import React, { useLayoutEffect, useRef } from 'react';
import React, { JSX, useLayoutEffect, useRef } from 'react';
import comboBox from '@uswds/uswds/js/usa-combo-box';
import timePicker from '@uswds/uswds/js/usa-time-picker';
import FormGroup from '../form-group';
Expand Down

0 comments on commit 334b6f9

Please sign in to comment.