Skip to content

Commit 1df0d20

Browse files
committed
[react] Replace deprecated SFC with FC
1 parent 99e104d commit 1df0d20

73 files changed

Lines changed: 159 additions & 159 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

types/agiledigital__mule-preview/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface MulePreviewContentProps {
2626
readonly contentRoot: string;
2727
}
2828

29-
export const MulePreviewDiffUrl: React.SFC<MulePreviewDiffUrlProps>;
30-
export const MulePreviewDiffContent: React.SFC<MulePreviewDiffContentProps>;
31-
export const MulePreviewUrl: React.SFC<MulePreviewUrlProps>;
32-
export const MulePreviewContent: React.SFC<MulePreviewContentProps>;
29+
export const MulePreviewDiffUrl: React.FC<MulePreviewDiffUrlProps>;
30+
export const MulePreviewDiffContent: React.FC<MulePreviewDiffContentProps>;
31+
export const MulePreviewUrl: React.FC<MulePreviewUrlProps>;
32+
export const MulePreviewContent: React.FC<MulePreviewContentProps>;

types/create-subscription/create-subscription-tests.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ declare const eventDispatcher: EventDispatcher<number>;
4747
// ----------------------------------------------------------------------------
4848

4949
// Start with a simple component.
50-
const LoadingComponent: React.SFC<{ loadingStatus: string | undefined }> = ({ loadingStatus }) => {
50+
const LoadingComponent: React.FC<{ loadingStatus: string | undefined }> = ({ loadingStatus }) => {
5151
if (loadingStatus === undefined) {
5252
// Loading
5353
} else if (loadingStatus === null) {

types/emoji-mart/dist-es/components/emoji/nimble-emoji.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ export interface NimbleEmojiProps extends EmojiProps {
66
data: Data;
77
}
88

9-
declare const NimbleEmoji: React.SFC<NimbleEmojiProps>;
9+
declare const NimbleEmoji: React.FC<NimbleEmojiProps>;
1010

1111
export { NimbleEmoji as default };

types/input-moment/input-moment-tests.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ const momentI = moment();
77
const OnChange: (m: moment.Moment) => void = (m: moment.Moment) => console.log(m);
88
const OnSave: () => void = () => console.log('Save');
99

10-
const InputMomentTest: React.SFC = () => <InputMoment moment={momentI} onChange={OnChange} onSave={OnSave} />;
10+
const InputMomentTest: React.FC = () => <InputMoment moment={momentI} onChange={OnChange} onSave={OnSave} />;

types/material-ui/material-ui-tests.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4730,7 +4730,7 @@ class DropDownMenuOpenImmediateExample extends Component<{}, {value?: number | u
47304730
}
47314731
}
47324732

4733-
const DropDownMenuAnchorExample: React.SFC = () => (
4733+
const DropDownMenuAnchorExample: React.FC = () => (
47344734
<DropDownMenu
47354735
value={1}
47364736
targetOrigin={{ horizontal: 'middle', vertical: 'top' }}

types/meteor/test/react-meteor-data-tests.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface DemoComponentData {
1010
result: string;
1111
}
1212

13-
const DemoComponent: React.SFC<DemoComponentContainerProps & DemoComponentData> = props => <div>{props.data}</div>;
13+
const DemoComponent: React.FC<DemoComponentContainerProps & DemoComponentData> = props => <div>{props.data}</div>;
1414

1515
const DemoComponentContainer: React.ComponentClass<DemoComponentContainerProps> = withTracker<
1616
DemoComponentData,

types/react-adal/react-adal-tests.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ runWithAdal(authContext, () => {
3434

3535
const withAdalLoginApi = withAdalLogin(authContext, resourceUrl);
3636

37-
const Loading: React.SFC = (props) => {
37+
const Loading: React.FC = (props) => {
3838
return null;
3939
};
4040

41-
const ErrorPage: React.SFC = (props) => {
41+
const ErrorPage: React.FC = (props) => {
4242
return null;
4343
};
4444

@@ -54,7 +54,7 @@ class ProtectedPage1 extends React.Component {
5454
}
5555
}
5656

57-
const ProtectedPage2: React.SFC = (props) => {
57+
const ProtectedPage2: React.FC = (props) => {
5858
return null;
5959
};
6060

types/react-css-collapse/react-css-collapse-tests.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as React from "react";
2-
import { SFC } from "react";
2+
import { FC } from "react";
33
import { render } from "react-dom";
44
import Collapse from "react-css-collapse";
55

6-
const TestOpen: SFC = () => (
6+
const TestOpen: FC = () => (
77
<Collapse isOpen>
88
<div>
99
i am open

types/react-currency-formatter/react-currency-formatter-tests.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface Props {
66
currency: string;
77
}
88

9-
const ProductionPrice: React.SFC<Props> = (props: Props) => (
9+
const ProductionPrice: React.FC<Props> = (props: Props) => (
1010
<CurrencyFormatter quantity={props.price} currency={props.currency} />
1111
);
1212

types/react-daterange-picker/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export interface BaseProps<T = DateRangePicker> extends React.Props<T> {
4343
onHighlightDate?(date: Date): void;
4444
onHighlightRange?(date: Date): void;
4545
onSelectStart?(value: momentRange.MomentRange & typeof moment): void;
46-
paginationArrowComponent?: React.ComponentClass<PaginationArrowProps> | React.SFC<PaginationArrowProps> | undefined;
46+
paginationArrowComponent?: React.ComponentClass<PaginationArrowProps> | React.FC<PaginationArrowProps> | undefined;
4747
selectedLabel?: string | undefined;
4848
singleDateRange?: boolean | undefined;
4949
showLegend?: boolean | undefined;

0 commit comments

Comments
 (0)