Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Added FloatingLabel #221

Open
wants to merge 3 commits into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/views/inputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ import {
import {
Input,
SearchBar,
FloatingTextInput,
Icon,
Button,
ThemeProvider,
InputProps,
FloatingInputProps,
} from 'react-native-elements';
import { Header, SubHeader } from '../components/header';

Expand Down Expand Up @@ -46,6 +48,8 @@ const Inputs: React.FunctionComponent<InputsComponentProps> = () => {
};

const inputProps = {};
const floatingInputProps = {};

return (
<KeyboardAvoidingView
style={styles.keyboardAvoidingView}
Expand Down Expand Up @@ -93,6 +97,11 @@ const Inputs: React.FunctionComponent<InputsComponentProps> = () => {
placeholder="Simple input"
style={InputFieldsStyle}
/>
<FloatingTextInput
{...(floatingInputProps as FloatingInputProps)}
style={styles.textInputStyle}
label="Floating Label"
/>
<Input
{...(inputProps as InputProps)}
leftIcon={
Expand Down Expand Up @@ -422,6 +431,9 @@ const styles = StyleSheet.create({
marginTop: 16,
width: '90%',
},
textInputStyle: {
margin: 20,
},
keyboardAvoidingView: {
flex: 1,
flexDirection: 'column',
Expand Down