mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-20 05:26:20 +00:00
Fixed no longer implicit children prop in FunctionalComponent type
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { FC } from 'react';
|
||||
import { FC, PropsWithChildren } from 'react';
|
||||
|
||||
export const FormText: FC = ({ children }) => <small className="form-text text-muted d-block">{children}</small>;
|
||||
export const FormText: FC<PropsWithChildren<unknown>> = ({ children }) => (
|
||||
<small className="form-text text-muted d-block">{children}</small>
|
||||
);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { FC } from 'react';
|
||||
import { FC, PropsWithChildren } from 'react';
|
||||
import { InputType } from 'reactstrap/types/lib/Input';
|
||||
import { LabeledFormGroup } from './LabeledFormGroup';
|
||||
|
||||
export interface InputFormGroupProps {
|
||||
export type InputFormGroupProps = PropsWithChildren<{
|
||||
value: string;
|
||||
onChange: (newValue: string) => void;
|
||||
type?: InputType;
|
||||
@@ -10,7 +10,7 @@ export interface InputFormGroupProps {
|
||||
placeholder?: string;
|
||||
className?: string;
|
||||
labelClassName?: string;
|
||||
}
|
||||
}>;
|
||||
|
||||
export const InputFormGroup: FC<InputFormGroupProps> = (
|
||||
{ children, value, onChange, type, required, placeholder, className, labelClassName },
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { FC, ReactNode } from 'react';
|
||||
import { FC, PropsWithChildren, ReactNode } from 'react';
|
||||
|
||||
interface LabeledFormGroupProps {
|
||||
type LabeledFormGroupProps = PropsWithChildren<{
|
||||
label: ReactNode;
|
||||
noMargin?: boolean;
|
||||
className?: string;
|
||||
labelClassName?: string;
|
||||
}
|
||||
}>;
|
||||
|
||||
/* eslint-disable jsx-a11y/label-has-associated-control */
|
||||
export const LabeledFormGroup: FC<LabeledFormGroupProps> = (
|
||||
|
||||
Reference in New Issue
Block a user