UNPKG

@audira/carbon-react-native

Version:

Build React Native apps with component and shared patterns using Carbon

43 lines (42 loc) 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TextAreaField = void 0; var _react = require("react"); var _reactNative = require("react-native"); var _carbonReactNativeElements = require("@audira/carbon-react-native-elements"); var _index = require("../text-input-field/index.js"); var _jsxRuntime = require("react/jsx-runtime"); const TextAreaField = exports.TextAreaField = /*#__PURE__*/(0, _react.forwardRef)(function ({ style, textAlignVertical = 'top', textInputStyle, ...props }, ref) { return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TextInputField, { ref: ref, ...props, multiline: true, textAlignVertical: textAlignVertical, style: [styleSheet.textAreaField, style], textInputStyle: [styleSheet.rnTextInput, textInputStyle] }); }); const styleSheet = _reactNative.StyleSheet.create({ textAreaField: { height: 'auto', minHeight: _carbonReactNativeElements.Spacing.spacing_08 }, rnTextInput: { paddingTop: 11, paddingBottom: 11, height: _carbonReactNativeElements.Typography.TypeSets.body_compact_01.lineHeight * 4 + 22, ..._reactNative.Platform.select({ web: { resize: 'vertical' } }) } }); //# sourceMappingURL=TextAreaField.js.map