UNPKG

@sishuguojixuefu/react-native-form

Version:
35 lines 1.26 kB
"use strict"; var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; result["default"] = mod; return result; }; Object.defineProperty(exports, "__esModule", { value: true }); const react_1 = __importStar(require("react")); const react_native_1 = require("react-native"); class ErrorTip extends react_1.Component { render() { const { children, error, last } = this.props; return (react_1.default.createElement(react_native_1.View, { style: !last && styles.container }, children, error ? react_1.default.createElement(react_native_1.Text, { style: styles.errorText }, error) : null)); } } const styles = react_native_1.StyleSheet.create({ container: { borderBottomColor: '#dddddd', borderBottomWidth: react_native_1.StyleSheet.hairlineWidth, }, errorText: { color: 'red', fontSize: 14, includeFontPadding: true, marginLeft: 15, paddingBottom: 6, textAlignVertical: 'center', }, }); exports.default = ErrorTip; //# sourceMappingURL=ErrorTip.js.map