8000 fix: fix component type error (#6821) · react-bootstrap/react-bootstrap@ab5e5fb · GitHub
[go: up one dir, main page]

Skip to content

Commit ab5e5fb

Browse files
authored
fix: fix component type error (#6821)
1 parent 71c332b commit ab5e5fb

Some content is hidden

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

83 files changed

+84
-84
lines changed

src/Accordion.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const Accordion: BsPrefixRefForwardingComponent<'div', AccordionProps> =
9191
/>
9292
</AccordionContext.Provider>
9393
);
94-
});
94+
}) as typeof Accordion;
9595

9696
Accordion.displayName = 'Accordion';
9797
Accordion.propTypes = propTypes;

src/AccordionBody.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const AccordionBody: BsPrefixRefForwardingComponent<'div', AccordionBodyProps> =
8585
</AccordionCollapse>
8686
);
8787
},
88-
);
88+
) as typeof AccordionBody;
8989

9090
AccordionBody.propTypes = propTypes;
9191
AccordionBody.displayName = 'AccordionBody';

src/AccordionButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const AccordionButton: BsPrefixRefForwardingComponent<
100100
/>
101101
);
102102
},
103-
);
103+
) as typeof AccordionButton;
104104

105105
AccordionButton.propTypes = propTypes;
106106
AccordionButton.displayName = 'AccordionButton';

src/AccordionHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const AccordionHeader: BsPrefixRefForwardingComponent<
4848
</Component>
4949
);
5050
},
51-
);
51+
) as typeof AccordionHeader;
5252

5353
AccordionHeader.propTypes = propTypes;
5454
AccordionHeader.displayName = 'AccordionHeader';

src/AccordionItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const AccordionItem: BsPrefixRefForwardingComponent<'div', AccordionItemProps> =
5959
</AccordionItemContext.Provider>
6060
);
6161
},
62-
);
62+
) as typeof AccordionItem;
6363

6464
AccordionItem.propTypes = propTypes;
6565
AccordionItem.displayName = 'AccordionItem';

src/AlertHeading.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const AlertHeading: BsPrefixRefForwardingComponent<'div', AlertHeadingProps> =
2323
/>
2424
);
2525
},
26-
);
26+
) as typeof AlertHeading;
2727

2828
AlertHeading.displayName = 'AlertHeading';
2929

src/AlertLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const AlertLink: BsPrefixRefForwardingComponent<'a', AlertLinkProps> =
2020
/>
2121
);
2222
},
23-
);
23+
) as typeof AlertLink;
2424

2525
AlertLink.displayName = 'AlertLink';
2626

src/Badge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const Badge: BsPrefixRefForwardingComponent<'span', BadgeProps> =
7171
/>
7272
);
7373
},
74-
);
74+
) as typeof Badge;
7575

7676
Badge.displayName = 'Badge';
7777
Badge.propTypes = propTypes;

src/Breadcrumb.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const Breadcrumb: BsPrefixRefForwardingComponent<'nav', BreadcrumbProps> =
6666
</Component>
6767
);
6868
},
69-
);
69+
) as typeof Breadcrumb;
7070

7171
Breadcrumb.displayName = 'Breadcrumb';
7272
Breadcrumb.propTypes = propTypes;

src/BreadcrumbItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const BreadcrumbItem: BsPrefixRefForwardingComponent<
9595
</Component>
9696
);
9797
},
98-
);
98+
) as typeof BreadcrumbItem;
9999

100100
BreadcrumbItem.displayName = 'BreadcrumbItem';
101101
BreadcrumbItem.propTypes = propTypes;

src/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const Button: BsPrefixRefForwardingComponent<'button', ButtonProps> =
113113
/>
114114
);
115115
},
116-
);
116+
) as typeof Button;
117117

118118
Button.displayName = 'Button';
119119
Button.propTypes = propTypes;

src/ButtonGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const ButtonGroup: BsPrefixRefForwardingComponent<'div', ButtonGroupProps> =
7171
/>
7272
);
7373
},
74-
);
74+
) as typeof ButtonGroup;
7575

7676
ButtonGroup.displayName = 'ButtonGroup';
7777
ButtonGroup.propTypes = propTypes;

src/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const Card: BsPrefixRefForwardingComponent<'div', CardProps> = React.forwardRef<
9797
</Component>
9898
);
9999
},
100-
);
100+
) as typeof Card;
101101

102102
Card.displayName = 'Card';
103103
Card.propTypes = propTypes;

src/CardBody.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const CardBody: BsPrefixRefForwardingComponent<'div', CardBodyProps> =
1919
/>
2020
);
2121
},
22-
);
22+
) as typeof CardBody;
2323

2424
CardBody.displayName = 'CardBody';
2525

src/CardFooter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const CardFooter: BsPrefixRefForwardingComponent<'div', CardFooterProps> =
1919
/>
2020
);
2121
},
22-
);
22+
) as typeof CardFooter;
2323

2424
CardFooter.displayName = 'CardFooter';
2525

src/CardGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const CardGroup: BsPrefixRefForwardingComponent<'div', CardGroupProps> =
1919
/>
2020
);
2121
},
22-
);
22+
) as typeof CardGroup;
2323

2424
CardGroup.displayName = 'CardGroup';
2525

src/CardHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const CardHeader: BsPrefixRefForwardingComponent<'div', CardHeaderProps> =
5050
</CardHeaderContext.Provider>
5151
);
5252
},
53-
);
53+
) as typeof CardHeader;
5454

5555
CardHeader.displayName = 'CardHeader';
5656
CardHeader.propTypes = propTypes;

src/CardImg.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const CardImg: BsPrefixRefForwardingComponent<'img', CardImgProps> =
5454
/>
5555
);
5656
},
57-
);
57+
) as typeof CardImg;
5858
CardImg.displayName = 'CardImg';
5959
CardImg.propTypes = propTypes;
6060

src/CardImgOverlay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const CardImgOverlay: BsPrefixRefForwardingComponent<
2121
/>
2222
);
2323
},
24-
);
24+
) as typeof CardImgOverlay;
2525

2626
CardImgOverlay.displayName = 'CardImgOverlay';
2727

src/CardLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const CardLink: BsPrefixRefForwardingComponent<'a', CardLinkProps> =
1919
/>
2020
);
2121
},
22-
);
22+
) as typeof CardLink;
2323

2424
CardLink.displayName = 'CardLink';
2525

src/CardSubtitle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const CardSubtitle: BsPrefixRefForwardingComponent<'div', CardSubtitleProps> =
2222
/>
2323
);
2424
},
25-
);
25+
) as typeof CardSubtitle;
2626

2727
CardSubtitle.displayName = 'CardSubtitle';
2828

src/CardText.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const CardText: BsPrefixRefForwardingComponent<'p', CardTextProps> =
1919
/>
2020
);
2121
},
22-
);
22+
) as typeof CardText;
2323

2424
CardText.displayName = 'CardText';
2525

src/CardTitle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const CardTitle: BsPrefixRefForwardingComponent<'div', CardTitleProps> =
2222
/>
2323
);
2424
},
25-
);
25+
) as typeof CardTitle;
2626

2727
CardTitle.displayName = 'CardTitle';
2828

src/CarouselCaption.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const CarouselCaption: BsPrefixRefForwardingComponent<
2121
/>
2222
);
2323
},
24-
);
24+
) as typeof CarouselCaption;
2525

2626
CarouselCaption.displayName = 'CarouselCaption';
2727

src/CarouselItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const CarouselItem: BsPrefixRefForwardingComponent<'div', CarouselItemProps> =
3939
);
4040
return <Component ref={ref} {...props} className={finalClassName} />;
4141
},
42-
);
42+
) as typeof CarouselItem;
4343

4444
CarouselItem.displayName = 'CarouselItem';
4545
CarouselItem.propTypes = propTypes;

src/Col.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ const Col: BsPrefixRefForwardingComponent<'div', ColProps> = React.forwardRef<
188188
/>
189189
);
190190
},
191-
);
191+
) as typeof Col;
192192

193193
Col.displayName = 'Col';
194194
Col.propTypes = propTypes;

src/Container.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const Container: BsPrefixRefForwardingComponent<'div', ContainerProps> =
5454
/>
5555
);
5656
},
57-
);
57+
) as typeof Container;
5858

5959
Container.displayName = 'Container';
6060
Container.propTypes = propTypes;

src/Dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ const Dropdown: BsPrefixRefForwardingComponent<'div', DropdownProps> =
216216
</BaseDropdown>
217217
</DropdownContext.Provider>
218218
);
219-
});
219+
}) as typeof Dropdown;
220220

221221
Dropdown.displayName = 'Dropdown';
222222
Dropdown.propTypes = propTypes;

src/DropdownButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ const DropdownButton: BsPrefixRefForwardingComponent<
136136
</DropdownMenu>
137137
</Dropdown>
138138
),
139-
);
139+
) as typeof DropdownButton;
140140

141141
DropdownButton.displayName = 'DropdownButton';
142142
DropdownButton.propTypes = propTypes;

src/DropdownDivider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const DropdownDivider: BsPrefixRefForwardingComponent<
2525
/>
2626
);
2727
},
28-
);
28+
) as typeof DropdownDivider;
2929

3030
DropdownDivider.displayName = 'DropdownDivider';
3131

src/DropdownHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const DropdownHeader: BsPrefixRefForwardingComponent<
2525
/>
2626
);
2727
},
28-
);
28+
) as typeof DropdownHeader;
2929

3030
DropdownHeader.displayName = 'DropdownHeader';
3131

src/DropdownItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const DropdownItem: BsPrefixRefForwardingComponent<'a', DropdownItemProps> =
8383
/>
8484
);
8585
},
86-
);
86+
) as typeof DropdownItem;
8787

8888
DropdownItem.displayName = 'DropdownItem';
8989
DropdownItem.propTypes = propTypes;

src/DropdownItemText.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const DropdownItemText: BsPrefixRefForwardingComponent<
2121
/>
2222
);
2323
},
24-
);
24+
) as typeof DropdownItemText;
2525

2626
DropdownItemText.displayName = 'DropdownItemText';
2727

src/DropdownMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ const DropdownMenu: BsPrefixRefForwardingComponent<'div', DropdownMenuProps> =
223223
/>
224224
);
225225
},
226-
);
226+
) as typeof DropdownMenu;
227227

228228
DropdownMenu.displayName = 'DropdownMenu';
229229
DropdownMenu.propTypes = propTypes;

src/DropdownToggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const DropdownToggle: DropdownToggleComponent = React.forwardRef(
9090
/>
9191
);
9292
},
93-
);
93+
) as typeof DropdownToggle;
9494

9595
DropdownToggle.displayName = 'DropdownToggle';
9696
DropdownToggle.propTypes = propTypes;

src/Feedback.tsx

+1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const Feedback: BsPrefixRefForwardingComponent<'div', FeedbackProps> =
5151
)}
5252
/>
5353
),
54-
);
54+
) as typeof Feedback;
5555

5656
Feedback.displayName = 'Feedback';
5757
Feedback.propTypes = propTypes;

src/Figure.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const Figure: BsPrefixRefForwardingComponent<'figure', FigureProps> =
2121
/>
2222
);
2323
},
24-
);
24+
) as typeof Figure;
2525

2626
Figure.displayName = 'Figure';
2727

src/FigureCaption.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const FigureCaption: BsPrefixRefForwardingComponent<
2121
/>
2222
);
2323
},
24-
);
24+
) as typeof FigureCaption;
2525

2626
FigureCaption.displayName = 'FigureCaption';
2727

src/FloatingLabel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const FloatingLabel: BsPrefixRefForwardingComponent<'div', FloatingLabelProps> =
4242
</FormGroup>
4343
);
4444
},
45-
);
45+
) as typeof FloatingLabel;
4646

4747
FloatingLabel.displayName = 'FloatingLabel';
4848
FloatingLabel.propTypes = propTypes;

src/Form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const Form: BsPrefixRefForwardingComponent<'form', FormProps> =
5656
className={classNames(className, validated && 'was-validated')}
5757
/>
5858
),
59-
);
59+
) as typeof Form;
6060

6161
Form.displayName = 'Form';
6262
Form.propTypes = propTypes as any;

src/FormCheck.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ const FormCheck: BsPrefixRefForwardingComponent<'input', FormCheckProps> =
211211
</FormContext.Provider>
212212
);
213213
},
214-
);
214+
) as typeof FormCheck;
215215

216216
FormCheck.displayName = 'FormCheck';
217217
FormCheck.propTypes = propTypes;

src/FormCheckInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const FormCheckInput: BsPrefixRefForwardingComponent<
7878
/>
7979
);
8080
},
81-
);
81+
) as typeof FormCheckInput;
8282

8383
FormCheckInput.displayName = 'FormCheckInput';
8484
FormCheckInput.propTypes = propTypes;

src/FormControl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const FormControl: BsPrefixRefForwardingComponent<'input', FormControlProps> =
150150
/>
151151
);
152152
},
153-
);
153+
) as typeof FormControl;
154154

155155
FormControl.displayName = 'FormControl';
156156
FormControl.propTypes = propTypes;

src/FormFloating.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const FormFloating: BsPrefixRefForwardingComponent<'div', FormFloatingProps> =
1919
/>
2020
);
2121
},
22-
);
22+
) as typeof FormFloating;
2323

2424
FormFloating.displayName = 'FormFloating';
2525

0 commit comments

Comments
 (0)
0