Add correct types for Input and Select components
[MAILPOET-2772]
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
import React from 'react';
|
import React, { InputHTMLAttributes } from 'react';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
|
||||||
type Props = {
|
type Props = InputHTMLAttributes<HTMLInputElement> & {
|
||||||
dimension?: 'small',
|
dimension?: 'small',
|
||||||
isFullWidth?: boolean,
|
isFullWidth?: boolean,
|
||||||
iconStart?: JSX.Element,
|
iconStart?: JSX.Element,
|
||||||
iconEnd?: JSX.Element,
|
iconEnd?: JSX.Element,
|
||||||
[attribute: string]: any, // any HTML attributes, e.g. type, name, id, placeholder
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const Input = ({
|
const Input = ({
|
||||||
|
@@ -1,12 +1,11 @@
|
|||||||
import React from 'react';
|
import React, { SelectHTMLAttributes } from 'react';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
|
||||||
type Props = {
|
type Props = SelectHTMLAttributes<HTMLSelectElement> & {
|
||||||
children?: React.ReactNode,
|
children?: React.ReactNode,
|
||||||
dimension?: 'small',
|
dimension?: 'small',
|
||||||
isFullWidth?: boolean,
|
isFullWidth?: boolean,
|
||||||
iconStart?: JSX.Element,
|
iconStart?: JSX.Element,
|
||||||
[attribute: string]: any, // any HTML attributes, e.g. name, id
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const Select = ({
|
const Select = ({
|
||||||
|
Reference in New Issue
Block a user