From 3b3a0abd9bda07a2e1ac223497e017b2195a180f Mon Sep 17 00:00:00 2001 From: Andrii Kostenko Date: Tue, 29 Jan 2019 22:25:06 +0300 Subject: [PATCH] fix(text-field): Do not import constants from @material/textfield internals (#639) --- packages/text-field/Input.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 > {