From 128da02d428ccd30d10291a279d95f869e7a227f Mon Sep 17 00:00:00 2001 From: Hugo de Moraes Date: Tue, 18 May 2021 11:47:11 -0300 Subject: [PATCH] fix(textinput): show/hide bottom line (#81) * fix(textinput): show/hide bottom line * fix(lint): change interface for type on export --- package.json | 2 +- src/native/components/TextInput/index.tsx | 4 ++-- src/native/types/TextInputType.ts | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 36604ba5..bb9b561b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@platformbuilders/react-elements", - "version": "0.1.8", + "version": "0.1.9", "description": "Platform Builders Shared Components Library For React Web and Native", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/native/components/TextInput/index.tsx b/src/native/components/TextInput/index.tsx index 8891a400..4ae857b9 100644 --- a/src/native/components/TextInput/index.tsx +++ b/src/native/components/TextInput/index.tsx @@ -28,7 +28,7 @@ const TextInput: FC = ({ large = false, contrast = false, centered = false, - withoutBottomline, + withBottomline = false, multiline = false, autoFocus = false, allowFontScaling = false, @@ -244,7 +244,7 @@ const TextInput: FC = ({ )} - {(!withoutBottomline || !borderedHeight) && ( + {(withBottomline || !!borderedHeight) && ( )} diff --git a/src/native/types/TextInputType.ts b/src/native/types/TextInputType.ts index 2821c8e9..63d5c42b 100644 --- a/src/native/types/TextInputType.ts +++ b/src/native/types/TextInputType.ts @@ -10,7 +10,7 @@ import { TextInputMaskTypeProp } from '@platformbuilders/react-native-masked-tex import { HitSlopType } from './Common'; import { TypographyVariants } from './Variants'; -export interface TextInputType extends TextInputProps { +export type TextInputType = { id: string; accessibility: string; inputRef?: any; @@ -18,7 +18,7 @@ export interface TextInputType extends TextInputProps { ref?: RefObject; variant?: TypographyVariants; large?: boolean; - withoutBottomline?: boolean; + withBottomline?: boolean; contrast?: boolean; centered?: boolean; iconSize?: number; @@ -45,7 +45,7 @@ export interface TextInputType extends TextInputProps { borderedRadius?: number; iconNameBordered?: string; fixedLabelVariant?: TypographyVariants; -} +} & TextInputProps; export interface MaskedTextInputType extends TextInputType { maskType: TextInputMaskTypeProp;