UNPKG

@nexara/nativeflow

Version:

Beautiful, responsive, and customizable UI components for React Native – built for performance and seamless experiences.

55 lines (54 loc) 1.61 kB
"use strict"; import React, { useMemo } from 'react'; import { View, StyleSheet, TouchableOpacity } from 'react-native'; import { moderateScale } from "../../helpers/ResponsiveCalculations.js"; import { X } from "../../assets/svg/index.js"; import { StyledText } from "../StyledComponents/index.js"; import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; const DialogHead = ({ variant = 'default', title = 'Title', textVariant = 'h4', fs, containerStyle, textStyle, children }) => { const STYLES = useMemo(Styles, []); const dynamicStyles = { borderBottomWidth: variant == 'default' ? 0.7 : 0, padding: moderateScale(variant === 'default' ? 16 : 25) }; return /*#__PURE__*/_jsx(_Fragment, { children: /*#__PURE__*/_jsxs(View, { style: [STYLES.CONTAINER, dynamicStyles, containerStyle], children: [/*#__PURE__*/_jsxs(View, { children: [/*#__PURE__*/_jsx(StyledText, { style: [STYLES.HEADER_TEXT, textStyle], fs: fs, variant: textVariant, children: title }), children] }), /*#__PURE__*/_jsx(TouchableOpacity, { children: /*#__PURE__*/_jsx(X, { color: "gray", size: moderateScale(20) }) })] }) }); }; export default DialogHead; const Styles = () => StyleSheet.create({ CONTAINER: { borderColor: '#d4d4d4', paddingBottom: moderateScale(16), justifyContent: 'space-between', flexDirection: 'row' }, HEADER_TEXT: { fontWeight: 'bold', color: '#000' } }); //# sourceMappingURL=DialogHead.js.map