@nexara/nativeflow
Version:
Beautiful, responsive, and customizable UI components for React Native – built for performance and seamless experiences.
54 lines (53 loc) • 1.63 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = require("react");
var _reactNative = require("react-native");
var _ResponsiveCalculations = require("../../helpers/ResponsiveCalculations.js");
var _index = require("../StyledComponents/index.js");
var _index2 = require("../../hooks/index.js");
var _jsxRuntime = require("react/jsx-runtime");
const DialogHead = ({
variant = 'default',
title,
fScale = 'xl',
fs,
ff,
containerStyle,
titleStyle,
children
}) => {
const theme = (0, _index2.useTheme)();
const STYLES = (0, _react.useMemo)(Styles, []);
const dynamicStyles = {
borderBottomWidth: variant == 'default' ? 0.7 : 0,
borderColor: theme?.colors.border.subtle,
padding: (0, _ResponsiveCalculations.verticalScale)(variant === 'default' ? 16 : 25)
};
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
style: [STYLES.CONTAINER, dynamicStyles, containerStyle],
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.StyledText, {
style: [STYLES.HEADER_TEXT, titleStyle],
fs: fs,
ff: ff,
fScale: fScale,
children: title || children
})
})
});
};
var _default = exports.default = DialogHead;
const Styles = () => _reactNative.StyleSheet.create({
CONTAINER: {
paddingBottom: (0, _ResponsiveCalculations.verticalScale)(16),
justifyContent: 'space-between',
flexDirection: 'row'
},
HEADER_TEXT: {
fontWeight: 'bold'
}
});
//# sourceMappingURL=DialogHead.js.map