UNPKG

@nexara/nativeflow

Version:

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

50 lines (49 loc) 1.37 kB
"use strict"; import { useMemo } from 'react'; import { View, StyleSheet } from 'react-native'; import { verticalScale } from "../../helpers/ResponsiveCalculations.js"; import { StyledText } from "../StyledComponents/index.js"; import { useTheme } from "../../hooks/index.js"; import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime"; const DialogHead = ({ variant = 'default', title, fScale = 'xl', fs, ff, containerStyle, titleStyle, children }) => { const theme = useTheme(); const STYLES = useMemo(Styles, []); const dynamicStyles = { borderBottomWidth: variant == 'default' ? 0.7 : 0, borderColor: theme?.colors.border.subtle, padding: verticalScale(variant === 'default' ? 16 : 25) }; return /*#__PURE__*/_jsx(_Fragment, { children: /*#__PURE__*/_jsx(View, { style: [STYLES.CONTAINER, dynamicStyles, containerStyle], children: /*#__PURE__*/_jsx(StyledText, { style: [STYLES.HEADER_TEXT, titleStyle], fs: fs, ff: ff, fScale: fScale, children: title || children }) }) }); }; export default DialogHead; const Styles = () => StyleSheet.create({ CONTAINER: { paddingBottom: verticalScale(16), justifyContent: 'space-between', flexDirection: 'row' }, HEADER_TEXT: { fontWeight: 'bold' } }); //# sourceMappingURL=DialogHead.js.map