UNPKG

@nexara/nativeflow

Version:

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

33 lines (32 loc) 828 B
"use strict"; import React, { useMemo } from "react"; import { horizontalScale } from "../../helpers/ResponsiveCalculations.js"; import { StyledView } from "../StyledComponents/index.js"; import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime"; const HStack = ({ justify, align = 'center', fWrap = 'wrap', gap = 10, style, children, ...rest }) => { const calculatedGap = useMemo(() => horizontalScale(gap), [gap]); const viewProps = { gap: calculatedGap, flexDirection: 'row', justifyContent: justify, alignItems: align, flexWrap: fWrap }; return /*#__PURE__*/_jsx(_Fragment, { children: /*#__PURE__*/_jsx(StyledView, { style: [viewProps, style], ...rest, children: children }) }); }; export default HStack; //# sourceMappingURL=HStack.js.map