|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
import React, { useMemo } from 'react' |
|
|
|
|
import { $size } from '@/shared/helpers' |
|
|
|
|
import { $size, getFont } from '@/shared/helpers' |
|
|
|
|
import { useTheme } from '@/shared/hooks/use-theme.hook' |
|
|
|
|
import { PartialTheme } from '@/shared/themes/interfaces' |
|
|
|
|
import { |
|
|
|
@ -19,6 +19,8 @@ import {
@@ -19,6 +19,8 @@ import {
|
|
|
|
|
} from 'react-native' |
|
|
|
|
import { LayoutChangeEvent } from 'react-native' |
|
|
|
|
import { useKeyboard } from '@/shared/hooks' |
|
|
|
|
import { Txt } from '@/shared' |
|
|
|
|
import _ from 'lodash' |
|
|
|
|
|
|
|
|
|
interface IProps { |
|
|
|
|
value: string |
|
|
|
@ -46,12 +48,16 @@ export const FormTextarea = (props: IProps) => {
@@ -46,12 +48,16 @@ export const FormTextarea = (props: IProps) => {
|
|
|
|
|
[], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
const customInputStyle: TextStyle = { |
|
|
|
|
fontFamily: getFont('Gilroy', '400'), |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<View style={[styles.wrapper, props.wrapStyle]}> |
|
|
|
|
{props.label ? ( |
|
|
|
|
<Text style={[styles.label, props.labelStyle]}> |
|
|
|
|
<Txt style={[styles.label, props.labelStyle]}> |
|
|
|
|
{props.label} |
|
|
|
|
</Text> |
|
|
|
|
</Txt> |
|
|
|
|
) : null} |
|
|
|
|
<View style={styles.inputWrapper}> |
|
|
|
|
<TextInput |
|
|
|
@ -61,7 +67,7 @@ export const FormTextarea = (props: IProps) => {
@@ -61,7 +67,7 @@ export const FormTextarea = (props: IProps) => {
|
|
|
|
|
}} |
|
|
|
|
inputAccessoryViewID={INPUT_ACCESSORIES_VIEW_ID} |
|
|
|
|
editable={!props.disabled} |
|
|
|
|
style={[styles.input, props.inputStyle]} |
|
|
|
|
style={[styles.input, customInputStyle, props.inputStyle]} |
|
|
|
|
value={props.value} |
|
|
|
|
onChangeText={val => props.onChange(props.name, val)} |
|
|
|
|
placeholder={props.placeholder} |
|
|
|
@ -103,7 +109,7 @@ const createStyles = (theme: PartialTheme) =>
@@ -103,7 +109,7 @@ const createStyles = (theme: PartialTheme) =>
|
|
|
|
|
input: { |
|
|
|
|
color: theme.input.$text, |
|
|
|
|
fontSize: $size(16, 14), |
|
|
|
|
fontWeight: '300', |
|
|
|
|
fontWeight: '400', |
|
|
|
|
}, |
|
|
|
|
error: { |
|
|
|
|
marginTop: $size(5), |
|
|
|
|