diff --git a/packages/text-field/Input.tsx b/packages/text-field/Input.tsx index b21d7f000..42b295ece 100644 --- a/packages/text-field/Input.tsx +++ b/packages/text-field/Input.tsx @@ -23,8 +23,6 @@ import * as React from 'react'; import * as classnames from 'classnames'; // @ts-ignore no .d.ts file import {MDCTextFieldFoundation} from '@material/textfield/dist/mdc.textfield'; -// @ts-ignore no .d.ts file -import {VALIDATION_ATTR_WHITELIST} from '@material/textfield/constants'; export interface InputProps { className: string; @@ -58,6 +56,11 @@ declare type ValidationAttrWhiteList = declare type ValidationAttrWhiteListReact = Exclude | 'minLength' | 'maxLength'; +const VALIDATION_ATTR_WHITELIST: ValidationAttrWhiteList[] = [ + 'pattern', 'min', 'max', 'required', 'step', 'minlength', 'maxlength', +]; + + export default class Input extends React.Component< Props, InputState > {