onClear?: () => void;
onClick?: (isOpen: boolean) => void;
open?: boolean;
- tooltipComponent?: React.ComponentType<{ overlay: React.ReactNode }>;
+ tooltipComponent?: React.ComponentType<React.PropsWithChildren<{ overlay: React.ReactNode }>>;
}
export function FacetBox(props: FacetBoxProps) {
innerRef?: React.Ref<HTMLButtonElement>;
overlay: string;
toggleFavorite: VoidFunction;
- tooltip?: React.ComponentType<{ overlay: React.ReactNode }>;
+ tooltip?: React.ComponentType<React.PropsWithChildren<{ overlay: React.ReactNode }>>;
}
export function FavoriteButton(props: Props) {
export type InteractiveIconSize = 'small' | 'medium';
export interface InteractiveIconProps {
- Icon: React.ComponentType<IconProps>;
+ Icon: React.ComponentType<React.PropsWithChildren<IconProps>>;
'aria-label': string;
children?: React.ReactNode;
className?: string;
${buttonIconStyle}
`;
-export const InteractiveIcon: React.FC<InteractiveIconProps> = styled(InteractiveIconBase)`
+export const InteractiveIcon: React.FC<React.PropsWithChildren<InteractiveIconProps>> = styled(
+ InteractiveIconBase,
+)`
--background: ${themeColor('interactiveIcon')};
--backgroundHover: ${themeColor('interactiveIconHover')};
--color: ${({ currentColor, theme }) =>
--focus: ${themeColor('interactiveIconFocus', OPACITY_20_PERCENT)};
`;
-export const DiscreetInteractiveIcon: React.FC<InteractiveIconProps> = styled(InteractiveIcon)`
+export const DiscreetInteractiveIcon: React.FC<
+ React.PropsWithChildren<InteractiveIconProps>
+> = styled(InteractiveIcon)`
--color: ${themeColor('discreetInteractiveIcon')};
`;
-export const DestructiveIcon: React.FC<InteractiveIconProps> = styled(InteractiveIconBase)`
+export const DestructiveIcon: React.FC<React.PropsWithChildren<InteractiveIconProps>> = styled(
+ InteractiveIconBase,
+)`
--background: ${themeColor('destructiveIcon')};
--backgroundHover: ${themeColor('destructiveIconHover')};
--color: ${themeContrast('destructiveIcon')};
--focus: ${themeColor('destructiveIconFocus', OPACITY_20_PERCENT)};
`;
-export const DismissProductNewsIcon: React.FC<InteractiveIconProps> = styled(InteractiveIcon)`
+export const DismissProductNewsIcon: React.FC<
+ React.PropsWithChildren<InteractiveIconProps>
+> = styled(InteractiveIcon)`
--background: ${themeColor('productNews')};
--backgroundHover: ${themeColor('productNewsHover')};
--color: ${themeContrast('productNews')};
popupPlacement?: PopupPlacement;
tags: string[];
tagsToDisplay?: number;
- tooltip?: React.ComponentType<{ overlay: React.ReactNode }>;
+ tooltip?: React.ComponentType<React.PropsWithChildren<{ overlay: React.ReactNode }>>;
}
export function Tags({
}
}
-class TooltipPortal extends React.Component {
+class TooltipPortal extends React.Component<React.PropsWithChildren> {
el: HTMLElement;
constructor(props: object) {
import { Size, iconSizeMap, sizeMap } from './utils';
export interface GenericAvatarProps {
- Icon?: React.ComponentType<IconProps>;
+ Icon?: React.ComponentType<React.PropsWithChildren<IconProps>>;
className?: string;
name: string;
size?: Size;
--border: ${themeBorder('default', 'transparent')(props)};
`;
-export const ButtonPrimary: React.FC<ButtonProps> = styled(Button)`
+export const ButtonPrimary: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
${PrimaryStyle}
`;
import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../helpers';
import { Button, ButtonProps } from './Button';
-export const ButtonSecondary: React.FC<ButtonProps> = styled(Button)`
+export const ButtonSecondary: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
--background: ${themeColor('buttonSecondary')};
--backgroundHover: ${themeColor('buttonSecondaryHover')};
--color: ${themeContrast('buttonSecondary')};
import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../helpers';
import { Button, ButtonProps } from './Button';
-export const DangerButtonPrimary: React.FC<ButtonProps> = styled(Button)`
+export const DangerButtonPrimary: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
--background: ${themeColor('dangerButton')};
--backgroundHover: ${themeColor('dangerButtonHover')};
--color: ${themeContrast('dangerButton')};
import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../helpers';
import { Button, ButtonProps } from './Button';
-export const DangerButtonSecondary: React.FC<ButtonProps> = styled(Button)`
+export const DangerButtonSecondary: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
--background: ${themeColor('dangerButtonSecondary')};
--backgroundHover: ${themeColor('dangerButtonSecondaryHover')};
--color: ${themeContrast('dangerButtonSecondary')};
);
}
-const ThirdPartyButtonStyled: React.FC<ButtonProps> = styled(Button)`
+const ThirdPartyButtonStyled: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
--background: ${themeColor('thirdPartyButton')};
--backgroundHover: ${themeColor('thirdPartyButtonHover')};
--color: ${themeContrast('thirdPartyButton')};
import { OPACITY_20_PERCENT, themeColor } from '../../helpers';
import { Button, ButtonProps } from './Button';
-export const WrapperButton: React.FC<ButtonProps> = styled(Button)`
+export const WrapperButton: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
--background: none;
--backgroundHover: none;
--color: none;
}
interface IconButtonProps {
- Icon?: React.ComponentType<IconProps>;
+ Icon?: React.ComponentType<React.PropsWithChildren<IconProps>>;
'aria-label'?: string;
className?: string;
copiedLabel?: string;
}
export function OcticonHoc(
- WrappedOcticon: React.ComponentType<OcticonProps>,
- displayName?: string
-): React.ComponentType<IconProps> {
+ WrappedOcticon: React.ComponentType<React.PropsWithChildren<OcticonProps>>,
+ displayName?: string,
+): React.ComponentType<React.PropsWithChildren<IconProps>> {
function IconWrapper({ fill, ...props }: IconProps) {
const theme = useTheme();
}
export function withTheme<P>(
- WrappedComponent: React.ComponentType<P & ThemeProp>
-): React.ComponentType<P> {
+ WrappedComponent: React.ComponentType<React.PropsWithChildren<P & ThemeProp>>,
+): React.ComponentType<React.PropsWithChildren<P>> {
return function WrappedComponentWithTheme(props: P) {
const theme = useTheme();
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-export type FCProps<T extends React.FunctionComponent<any>> = Parameters<T>[0];
+export type FCProps<T extends React.FunctionComponent<React.PropsWithChildren<any>>> =
+ Parameters<T>[0];
lastLocation?: string;
}
-export class PageTracker extends React.Component<Props, State> {
+export class PageTracker extends React.Component<React.PropsWithChildren<Props>, State> {
state: State = {};
componentDidMount() {
const LICENSE_PROMPT = 'sonarqube.license.prompt';
-export class StartupModal extends React.PureComponent<Props, State> {
+export class StartupModal extends React.PureComponent<React.PropsWithChildren<Props>, State> {
state: State = {};
componentDidMount() {
import { AdminPagesContext } from '../../../types/admin';
export default function withAdminPagesOutletContext(
- WrappedComponent: React.ComponentType<AdminPagesContext>,
+ WrappedComponent: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<AdminPagesContext>>
+ >,
) {
return function WithAdminPagesOutletContext() {
const { adminPages } = useOutletContext<AdminPagesContext>();
}
export default function withAppStateContext<P>(
- WrappedComponent: React.ComponentType<P & WithAppStateContextProps>,
+ WrappedComponent: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<P & WithAppStateContextProps>>
+ >,
) {
return class WithAppStateContext extends React.PureComponent<
Omit<P, keyof WithAppStateContextProps>
}
export default function withAvailableFeatures<P>(
- WrappedComponent: React.ComponentType<P & WithAvailableFeaturesProps>,
+ WrappedComponent: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<P & WithAvailableFeaturesProps>>
+ >,
) {
return class WithAvailableFeatures extends React.PureComponent<
Omit<P, keyof WithAvailableFeaturesProps>
import { ComponentContext } from './ComponentContext';
export default function withComponentContext<P extends Partial<ComponentContextShape>>(
- WrappedComponent: React.ComponentType<P>,
+ WrappedComponent: React.ComponentType<React.PropsWithChildren<React.PropsWithChildren<P>>>,
) {
return class WithComponentContext extends React.PureComponent<
Omit<P, keyof ComponentContextShape>
currentUser: CurrentUser;
}
-export default class CurrentUserContextProvider extends React.PureComponent<Props, State> {
+export default class CurrentUserContextProvider extends React.PureComponent<
+ React.PropsWithChildren<Props>,
+ State
+> {
constructor(props: Props) {
super(props);
this.state = { currentUser: props.currentUser ?? { isLoggedIn: false, dismissedNotices: {} } };
import { CurrentUserContext, CurrentUserContextInterface } from './CurrentUserContext';
export default function withCurrentUserContext<P>(
- WrappedComponent: React.ComponentType<P & Pick<CurrentUserContextInterface, 'currentUser'>>,
+ WrappedComponent: React.ComponentType<
+ React.PropsWithChildren<
+ React.PropsWithChildren<P & Pick<CurrentUserContextInterface, 'currentUser'>>
+ >
+ >,
) {
return class WithCurrentUserContext extends React.PureComponent<
Omit<P, 'currentUser' | 'updateCurrentUserHomepage' | 'updateDismissedNotices'>
languages: Languages;
}
-export default class LanguagesContextProvider extends React.PureComponent<{}, State> {
+export default class LanguagesContextProvider extends React.PureComponent<
+ React.PropsWithChildren,
+ State
+> {
mounted = false;
state: State = {
languages: {},
}
export default function withLanguagesContext<P>(
- WrappedComponent: React.ComponentType<P & WithLanguagesContextProps>,
+ WrappedComponent: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<P & WithLanguagesContextProps>>
+ >,
) {
return class WithLanguagesContext extends React.PureComponent<
Omit<P, keyof WithLanguagesContextProps>
metrics: Dict<Metric>;
}
-export default class MetricsContextProvider extends React.PureComponent<{}, State> {
+export default class MetricsContextProvider extends React.PureComponent<
+ React.PropsWithChildren,
+ State
+> {
mounted = false;
state: State = {
metrics: {},
}
export default function withMetricsContext<P>(
- WrappedComponent: React.ComponentType<P & WithMetricsContextProps>,
+ WrappedComponent: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<P & WithMetricsContextProps>>
+ >,
) {
return class WithMetricsContext extends React.PureComponent<
Omit<P, keyof WithMetricsContextProps>
}
export function withQualityProfilesContext<P extends Partial<QualityProfilesContextProps>>(
- WrappedComponent: React.ComponentType<P>,
-): React.ComponentType<Omit<P, keyof QualityProfilesContextProps>> {
+ WrappedComponent: React.ComponentType<React.PropsWithChildren<React.PropsWithChildren<P>>>,
+): React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<Omit<P, keyof QualityProfilesContextProps>>>
+> {
function ComponentWithQualityProfilesProps(props: P) {
const context = useOutletContext<QualityProfilesContextProps>();
return <WrappedComponent {...props} {...context} />;
}
- (ComponentWithQualityProfilesProps as React.FC<P>).displayName = getWrappedDisplayName(
- WrappedComponent,
- 'withQualityProfilesContext',
- );
+ (
+ ComponentWithQualityProfilesProps as React.FC<
+ React.PropsWithChildren<React.PropsWithChildren<P>>
+ >
+ ).displayName = getWrappedDisplayName(WrappedComponent, 'withQualityProfilesContext');
return ComponentWithQualityProfilesProps;
}
const { definition } = setting;
const name = getUniqueName(definition);
- let Input: React.ComponentType<DefaultSpecializedInputProps> = PrimitiveInput;
+ let Input: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<DefaultSpecializedInputProps>>
+ > = PrimitiveInput;
if (isCategoryDefinition(definition) && definition.multiValues) {
Input = MultiValueInput;
}
interface Props extends DefaultInputProps {
- input: React.ComponentType<DefaultSpecializedInputProps>;
+ input: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<DefaultSpecializedInputProps>>
+ >;
}
export default class InputForSecured extends React.PureComponent<Props, State> {
import InputForString from './InputForString';
import InputForText from './InputForText';
-function withOptions(options: string[]): React.ComponentType<DefaultSpecializedInputProps> {
+function withOptions(
+ options: string[],
+): React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<DefaultSpecializedInputProps>>
+> {
return function Wrapped(props: DefaultSpecializedInputProps) {
return <InputForSingleSelectList options={options} {...props} />;
};
const { setting, name, isDefault, ...other } = props;
const { definition } = setting;
const typeMapping: {
- [type in SettingType]?: React.ComponentType<DefaultSpecializedInputProps>;
+ [type in SettingType]?: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<DefaultSpecializedInputProps>>
+ >;
} = {
STRING: InputForString,
TEXT: InputForText,
links: A11ySkipLink[];
}
-export default class A11yProvider extends React.Component<{}, State> {
+export default class A11yProvider extends React.Component<React.PropsWithChildren, State> {
keys: string[] = [];
state: State = { links: [] };
ariaLabel?: string;
}
-export default class Radio extends React.PureComponent<Props> {
+export default class Radio extends React.PureComponent<React.PropsWithChildren<Props>> {
handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {
event.preventDefault();
}
}
-class TooltipPortal extends React.Component {
+class TooltipPortal extends React.Component<React.PropsWithChildren<{}>> {
el: HTMLElement;
constructor(props: {}) {
suggestions: SuggestionLink[];
}
-export default class SuggestionsProvider extends React.Component<{}, State> {
+export default class SuggestionsProvider extends React.Component<React.PropsWithChildren, State> {
keys: string[] = [];
state: State = { suggestions: [] };
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
export function getWrappedDisplayName<P>(
- WrappedComponent: React.ComponentType<P>,
+ WrappedComponent: React.ComponentType<React.PropsWithChildren<React.PropsWithChildren<P>>>,
hocName: string,
) {
const wrappedDisplayName = WrappedComponent.displayName ?? WrappedComponent.name ?? 'Component';
import { CurrentUser, isLoggedIn } from '../../types/users';
import { getWrappedDisplayName } from './utils';
-export function whenLoggedIn<P>(WrappedComponent: React.ComponentType<P>) {
+export function whenLoggedIn<P>(
+ WrappedComponent: React.ComponentType<React.PropsWithChildren<React.PropsWithChildren<P>>>,
+) {
class Wrapper extends React.Component<P & { currentUser: CurrentUser }> {
static displayName = getWrappedDisplayName(WrappedComponent, 'whenLoggedIn');
import { getWrappedDisplayName } from './utils';
export function withCLanguageFeature<P>(
- WrappedComponent: React.ComponentType<P & { hasCLanguageFeature: boolean }>,
+ WrappedComponent: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<P & { hasCLanguageFeature: boolean }>>
+ >,
) {
class Wrapper extends React.Component<Omit<P, 'hasCLanguageFeature'>> {
static displayName = getWrappedDisplayName(WrappedComponent, 'withCLanguageFeature');
}
export default function withIndexationContext<P>(
- WrappedComponent: React.ComponentType<P & WithIndexationContextProps>,
+ WrappedComponent: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<P & WithIndexationContextProps>>
+ >,
) {
return class WithIndexationContext extends React.PureComponent<
Omit<P, keyof WithIndexationContextProps>
Component,
showIndexationMessage,
}: {
- Component: React.ComponentType<P>;
+ Component: React.ComponentType<React.PropsWithChildren<React.PropsWithChildren<P>>>;
showIndexationMessage: (props: P) => boolean;
}) {
return function WithIndexationGuard(props: React.PropsWithChildren<P>) {
}
export default function withKeyboardNavigation<P>(
- WrappedComponent: React.ComponentType<P & Partial<WithKeyboardNavigationProps>>,
+ WrappedComponent: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<P & Partial<WithKeyboardNavigationProps>>>
+ >,
) {
return class Wrapper extends React.Component<P & WithKeyboardNavigationProps> {
static displayName = getWrappedDisplayName(WrappedComponent, 'withKeyboardNavigation');
import { Location, useLocation } from 'react-router-dom';
export default function withLocation<P>(
- WrappedComponent: React.ComponentType<P & { location: Location }>,
+ WrappedComponent: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<P & { location: Location }>>
+ >,
) {
return function WithLocation(props: Omit<P, 'location'>) {
const location = useLocation();
}
export function withNotifications<P>(
- WrappedComponent: React.ComponentType<P & WithNotificationsProps>,
+ WrappedComponent: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<P & WithNotificationsProps>>
+ >,
) {
class Wrapper extends React.Component<P, State> {
mounted = false;
}
export function withRouter<P extends Partial<WithRouterProps>>(
- WrappedComponent: React.ComponentType<P>,
-): React.ComponentType<Omit<P, keyof WithRouterProps>> {
+ WrappedComponent: React.ComponentType<React.PropsWithChildren<React.PropsWithChildren<P>>>,
+): React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<Omit<P, keyof WithRouterProps>>>
+> {
function ComponentWithRouterProp(props: P) {
const router = useRouter();
const params = useParams();
return <WrappedComponent {...props} location={location} params={params} router={router} />;
}
- (ComponentWithRouterProp as React.FC<P>).displayName = getWrappedDisplayName(
- WrappedComponent,
- 'withRouter',
- );
+ (
+ ComponentWithRouterProp as React.FC<React.PropsWithChildren<React.PropsWithChildren<P>>>
+ ).displayName = getWrappedDisplayName(WrappedComponent, 'withRouter');
return ComponentWithRouterProp;
}
const TOP_OFFSET = 200;
const BOTTOM_OFFSET = 10;
-export function withScrollTo<P>(WrappedComponent: React.ComponentClass<P>) {
- return class Wrapper extends React.Component<P & Partial<WithScrollToProps>> {
+export function withScrollTo<P>(
+ WrappedComponent: React.ComponentClass<React.PropsWithChildren<P>>,
+) {
+ return class Wrapper extends React.Component<
+ React.PropsWithChildren<P> & Partial<WithScrollToProps>
+ > {
componentRef?: React.Component | null;
node?: Element | Text | null;
type,
...iconProps
}: IconProps & ProjectLinkIconProps) {
- const getIcon = (): FC<IconProps | MIUIIconProps> => {
+ const getIcon = (): FC<
+ React.PropsWithChildren<React.PropsWithChildren<IconProps | MIUIIconProps>>
+ > => {
switch (type) {
case 'issue':
return miui ? PulseIcon : BugTrackerIcon;
interface State {
initialPermissionsCount: Dict<number>;
}
-export default class HoldersList extends React.PureComponent<Props, State> {
+export default class HoldersList extends React.PureComponent<
+ React.PropsWithChildren<Props>,
+ State
+> {
state: State = { initialPermissionsCount: {} };
componentDidUpdate(prevProps: Props) {
if (this.props.filter !== prevProps.filter || this.props.query !== prevProps.query) {
sections?: RuleDescriptionSection[];
}
-const EDUCATION_PRINCIPLES_MAP: Dict<React.ComponentType> = {
+const EDUCATION_PRINCIPLES_MAP: Dict<
+ React.ComponentType<React.PropsWithChildren<React.PropsWithChildren<unknown>>>
+> = {
defense_in_depth: DefenseInDepth,
never_trust_user_input: NeverTrustUserInput,
};
];
const BUILDTOOL_COMPONENT_MAP: {
- [x in BuildTools]: React.ComponentType<LanguageProps>;
+ [x in BuildTools]: React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<LanguageProps>>
+ >;
} = {
[BuildTools.Maven]: Maven,
[BuildTools.Gradle]: Gradle,
}
}
-class PortalWrapper extends React.Component {
+class PortalWrapper extends React.Component<React.PropsWithChildren> {
el: HTMLElement;
constructor(props: {}) {
Component = 'component',
}
-export default class Workspace extends React.PureComponent<{}, State> {
+export default class Workspace extends React.PureComponent<React.PropsWithChildren, State> {
mounted = false;
constructor(props: {}) {
}
interface WorkspaceHeaderButtonProps {
- icon: React.SFC<IconProps>;
+ icon: React.FC<React.PropsWithChildren<React.PropsWithChildren<IconProps>>>;
onClick: () => void;
tooltip: string;
}
import * as React from 'react';
import { createPortal } from 'react-dom';
-export default class WorkspacePortal extends React.PureComponent {
+export default class WorkspacePortal extends React.PureComponent<React.PropsWithChildren> {
el: HTMLElement;
constructor(props: {}) {
*/
import { ComponentClass, FunctionComponent } from 'react';
-export type ComponentPropsType<T extends ComponentClass | FunctionComponent<any>> =
- T extends ComponentClass<infer P> ? P : T extends FunctionComponent<infer P> ? P : never;
+export type ComponentPropsType<
+ T extends
+ | ComponentClass
+ | FunctionComponent<React.PropsWithChildren<React.PropsWithChildren<any>>>,
+> = T extends ComponentClass<infer P>
+ ? P
+ : T extends FunctionComponent<React.PropsWithChildren<React.PropsWithChildren<infer P>>>
+ ? P
+ : never;
export function mockIntersectionObserver(): Function {
let callback: Function;
export function withBranchLikes<P extends { component?: Component }>(
WrappedComponent: React.ComponentType<
- P & { branchLikes?: BranchLike[]; branchLike?: BranchLike; isFetchingBranch?: boolean }
+ React.PropsWithChildren<
+ React.PropsWithChildren<
+ P & { branchLikes?: BranchLike[]; branchLike?: BranchLike; isFetchingBranch?: boolean }
+ >
+ >
>,
-): React.ComponentType<Omit<P, 'branchLike' | 'branchLikes'>> {
+): React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<Omit<P, 'branchLike' | 'branchLikes'>>>
+> {
return function WithBranchLike(p: P) {
const { data, isFetching } = useBranchesQuery(p.component);
return (
export function withBranchStatusRefresh<
P extends { refreshBranchStatus: ReturnType<typeof useRefreshBranchStatus> },
->(WrappedComponent: React.ComponentType<P>): React.ComponentType<Omit<P, 'refreshBranchStatus'>> {
+>(
+ WrappedComponent: React.ComponentType<React.PropsWithChildren<React.PropsWithChildren<P>>>,
+): React.ComponentType<
+ React.PropsWithChildren<React.PropsWithChildren<Omit<P, 'refreshBranchStatus'>>>
+> {
return function WithBranchStatusRefresh(props: P) {
const refresh = useRefreshBranchStatus();
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-export type FCProps<T extends React.FunctionComponent<any>> = Parameters<T>[0];
+export type FCProps<T extends React.FunctionComponent<React.PropsWithChildren<any>>> =
+ Parameters<T>[0];