UNPKG

@oxyhq/services

Version:

OxyHQ Expo/React Native SDK — UI components, screens, and native features

39 lines (38 loc) 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _reactNative = require("react-native"); var _SectionTitle = _interopRequireDefault(require("./SectionTitle.js")); var _useColorScheme = require("../hooks/useColorScheme.js"); var _themeUtils = require("../utils/themeUtils.js"); var _jsxRuntime = require("react/jsx-runtime"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } const Section = ({ title, theme, children, isFirst = false, style }) => { const colorScheme = (0, _themeUtils.normalizeColorScheme)((0, _useColorScheme.useColorScheme)(), theme); return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, { style: [styles.section, isFirst && styles.firstSection, style], children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)(_SectionTitle.default, { title: title, theme: colorScheme }), children] }); }; const styles = _reactNative.StyleSheet.create({ section: { marginBottom: 10, gap: 12 }, firstSection: { marginTop: 8 } }); var _default = exports.default = Section; //# sourceMappingURL=Section.js.map