UNPKG

@livelike/react-native

Version:

LiveLike React Native package

58 lines 1.47 kB
import React from 'react'; import { StyleSheet, View, TextInput } from 'react-native'; import { useCustomFontStyle, useStyles, useTheme } from '../../hooks'; export function LLTextAskWidgetInput(_ref) { let { value, disabled, onChange, maxLength = 250, placeHolder = 'Write your message', styles: stylesProp } = _ref; const styles = useStyles({ componentStylesFn: getTextAskWidgetInputStyles, stylesProp }); const textInputStyle = useCustomFontStyle({ style: styles.input }); const { theme } = useTheme(); return /*#__PURE__*/React.createElement(View, { style: styles.container }, /*#__PURE__*/React.createElement(TextInput, { value: value, editable: !disabled, onChangeText: text => onChange === null || onChange === void 0 ? void 0 : onChange(text), multiline: true, numberOfLines: 4, maxLength: maxLength, placeholder: placeHolder, placeholderTextColor: theme.secondaryText, style: textInputStyle })); } const getTextAskWidgetInputStyles = _ref2 => { let { theme } = _ref2; return StyleSheet.create({ container: { display: 'flex' }, input: { color: theme.text, backgroundColor: theme.widgetOption, textAlignVertical: 'top', height: 85, paddingHorizontal: 16, paddingTop: 16, paddingBottom: 16, fontSize: 12, borderRadius: 4 } }); }; //# sourceMappingURL=LLTextAskWidgetInput.js.map