Skip to content

Commit

Permalink
fix(textinput): show/hide bottom line (#81)
Browse files Browse the repository at this point in the history
* fix(textinput): show/hide bottom line

* fix(lint): change interface for type on export
  • Loading branch information
hugodemoraes authored May 18, 2021
1 parent e391b74 commit 128da02
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/native/components/TextInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const TextInput: FC<TextInputType> = ({
large = false,
contrast = false,
centered = false,
withoutBottomline,
withBottomline = false,
multiline = false,
autoFocus = false,
allowFontScaling = false,
Expand Down Expand Up @@ -244,7 +244,7 @@ const TextInput: FC<TextInputType> = ({
</InputAreaWrapper>
)}

{(!withoutBottomline || !borderedHeight) && (
{(withBottomline || !!borderedHeight) && (
<BottomLine status={status} contrast={contrast} />
)}
</BorderedWrapper>
Expand Down
6 changes: 3 additions & 3 deletions src/native/types/TextInputType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ 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;
options?: any;
ref?: RefObject<any>;
variant?: TypographyVariants;
large?: boolean;
withoutBottomline?: boolean;
withBottomline?: boolean;
contrast?: boolean;
centered?: boolean;
iconSize?: number;
Expand All @@ -45,7 +45,7 @@ export interface TextInputType extends TextInputProps {
borderedRadius?: number;
iconNameBordered?: string;
fixedLabelVariant?: TypographyVariants;
}
} & TextInputProps;

export interface MaskedTextInputType extends TextInputType {
maskType: TextInputMaskTypeProp;
Expand Down

0 comments on commit 128da02

Please sign in to comment.