Skip to content

Commit 2491df8

Browse files
committed
chore(v8-react-example): handle React 18 type issues
1 parent 723872c commit 2491df8

File tree

439 files changed

+552
-512
lines changed

Some content is hidden

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

439 files changed

+552
-512
lines changed

packages/react-examples/src/azure-themes/stories/components/CalendarInlineMultidayDayView.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const dayOptions: IDropdownOption[] = [
1919
{ key: '6', text: '6' },
2020
];
2121

22-
export const CalendarInlineMultidayDayViewExample: React.FunctionComponent = () => {
22+
export const CalendarInlineMultidayDayViewExample: React.FunctionComponent<React.PropsWithChildren<unknown>> = () => {
2323
const [selectedDateRange, setSelectedDateRange] = React.useState<Date[]>();
2424
const [selectedDate, setSelectedDate] = React.useState<Date>();
2525
const [daysToSelectInDayView, setDaysToSelectInDayView] = React.useState(4);

packages/react-examples/src/azure-themes/stories/components/ContextMenu.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
title: 'Components/ContextualMenu',
77
};
88

9-
export const ContextualMenuDefaultExample: React.FunctionComponent = () => {
9+
export const ContextualMenuDefaultExample: React.FunctionComponent<React.PropsWithChildren<unknown>> = () => {
1010
return <DefaultButton text="Click for ContextualMenu" menuProps={menuProps} />;
1111
};
1212

packages/react-examples/src/azure-themes/stories/components/Pivots.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const labelStyles: Partial<IStyleSet<ILabelStyles>> = {
1111
root: { marginTop: 10 },
1212
};
1313

14-
export const PivotBasicExample: React.FunctionComponent = () => {
14+
export const PivotBasicExample: React.FunctionComponent<React.PropsWithChildren<unknown>> = () => {
1515
return (
1616
<Pivot aria-label="Basic Pivot Example">
1717
<PivotItem

packages/react-examples/src/azure-themes/stories/components/ProgressIndicator.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
const intervalDelay = 100;
99
const intervalIncrement = 0.01;
1010

11-
export const ProgressIndicatorBasicExample: React.FunctionComponent = () => {
11+
export const ProgressIndicatorBasicExample: React.FunctionComponent<React.PropsWithChildren<unknown>> = () => {
1212
const [percentComplete, setPercentComplete] = React.useState(0);
1313

1414
React.useEffect(() => {

packages/react-examples/src/azure-themes/stories/components/SpinButton.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const stackTokens: IStackTokens = { childrenGap: 20 };
1010
// By default the field grows to fit available width. Constrain the width instead.
1111
const styles: Partial<ISpinButtonStyles> = { spinButtonWrapper: { width: 75 } };
1212
const iconProps: IIconProps = { iconName: 'IncreaseIndentLegacy' };
13-
export const SpinButtonBasicExample: React.FunctionComponent = () => {
13+
export const SpinButtonBasicExample: React.FunctionComponent<React.PropsWithChildren<unknown>> = () => {
1414
return (
1515
<Stack tokens={stackTokens}>
1616
<SpinButton

packages/react-examples/src/azure-themes/stories/components/TeachingBubble.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const examplePrimaryButtonProps: IButtonProps = {
1111
children: 'Try it out',
1212
};
1313

14-
export const TeachingBubbleBasicExample: React.FunctionComponent = () => {
14+
export const TeachingBubbleBasicExample: React.FunctionComponent<React.PropsWithChildren<unknown>> = () => {
1515
const [teachingBubbleVisible, { toggle: toggleTeachingBubbleVisible }] = useBoolean(false);
1616

1717
const exampleSecondaryButtonProps: IButtonProps = React.useMemo(

packages/react-examples/src/azure-themes/stories/components/actionButton.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export interface IButtonExampleProps {
1414

1515
const addFriendIcon: IIconProps = { iconName: 'AddFriend' };
1616

17-
export const ButtonActionExample: React.FunctionComponent<IButtonExampleProps> = props => {
17+
export const ButtonActionExample: React.FunctionComponent<React.PropsWithChildren<IButtonExampleProps>> = props => {
1818
const { disabled } = props;
1919

2020
return (

packages/react-examples/src/azure-themes/stories/components/activityitem.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const classNames = mergeStyleSets({
1414
},
1515
});
1616

17-
export const ActivityItemBasicExample: React.FunctionComponent = () => {
17+
export const ActivityItemBasicExample: React.FunctionComponent<React.PropsWithChildren<unknown>> = () => {
1818
const activityItemExamples = [
1919
{
2020
key: 1,

packages/react-examples/src/azure-themes/stories/components/activityitempersonas.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const classNames = mergeStyleSets({
1515
},
1616
});
1717

18-
export const ActivityItemPersonaExample: React.FunctionComponent = () => {
18+
export const ActivityItemPersonaExample: React.FunctionComponent<React.PropsWithChildren<unknown>> = () => {
1919
const activityItemExamples: (IActivityItemProps & { key: string | number })[] = [
2020
{
2121
key: 1,

packages/react-examples/src/azure-themes/stories/components/buttonToggle.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface IButtonExampleProps {
1515
const volume0Icon: IIconProps = { iconName: 'Volume0' };
1616
const volume3Icon: IIconProps = { iconName: 'Volume3' };
1717

18-
export const ButtonToggleExample: React.FunctionComponent<IButtonExampleProps> = props => {
18+
export const ButtonToggleExample: React.FunctionComponent<React.PropsWithChildren<IButtonExampleProps>> = props => {
1919
const { disabled, checked } = props;
2020
const [muted, setMuted] = React.useState<boolean>(false);
2121
const onClick = () => setMuted(!muted);

0 commit comments

Comments
 (0)