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