@oxyhq/services
Version:
34 lines (33 loc) • 874 B
JavaScript
;
import { View, StyleSheet } from 'react-native';
import SectionTitle from "./SectionTitle.js";
import { useColorScheme } from "../hooks/useColorScheme.js";
import { normalizeColorScheme } from "../utils/themeUtils.js";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
const Section = ({
title,
theme,
children,
isFirst = false,
style
}) => {
const colorScheme = normalizeColorScheme(useColorScheme(), theme);
return /*#__PURE__*/_jsxs(View, {
style: [styles.section, isFirst && styles.firstSection, style],
children: [title && /*#__PURE__*/_jsx(SectionTitle, {
title: title,
theme: colorScheme
}), children]
});
};
const styles = StyleSheet.create({
section: {
marginBottom: 10,
gap: 12
},
firstSection: {
marginTop: 8
}
});
export default Section;
//# sourceMappingURL=Section.js.map