UNPKG

@audira/carbon-react-native

Version:

Build React Native apps with component and shared patterns using Carbon

39 lines (38 loc) 1.06 kB
"use strict"; import { forwardRef } from 'react'; import { Platform, StyleSheet } from 'react-native'; import { Spacing, Typography } from '@audira/carbon-react-native-elements'; import { TextInputField } from "../text-input-field/index.js"; import { jsx as _jsx } from "react/jsx-runtime"; export const TextAreaField = /*#__PURE__*/forwardRef(function ({ style, textAlignVertical = 'top', textInputStyle, ...props }, ref) { return /*#__PURE__*/_jsx(TextInputField, { ref: ref, ...props, multiline: true, textAlignVertical: textAlignVertical, style: [styleSheet.textAreaField, style], textInputStyle: [styleSheet.rnTextInput, textInputStyle] }); }); const styleSheet = StyleSheet.create({ textAreaField: { height: 'auto', minHeight: Spacing.spacing_08 }, rnTextInput: { paddingTop: 11, paddingBottom: 11, height: Typography.TypeSets.body_compact_01.lineHeight * 4 + 22, ...Platform.select({ web: { resize: 'vertical' } }) } }); //# sourceMappingURL=TextAreaField.js.map