UNPKG

@nexara/nativeflow

Version:

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

39 lines (38 loc) 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _index = require("../StyledComponents/index.js"); var _index2 = require("../../hooks/index.js"); var _index3 = require("../../helpers/index.js"); var _jsxRuntime = require("react/jsx-runtime"); const Surface = ({ variant = 'default', padding = 10, br = 5, children, ...rest }) => { const { colors } = (0, _index2.useTheme)(); const styles = variant === 'elevated' ? { boxShadow: colors.elevation.level1 } : variant === 'outlined' ? { borderColor: colors.border.default, borderWidth: 0.5 } : {}; return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, { children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.StyledView, { padding: (0, _index3.verticalScale)(padding), borderRadius: (0, _index3.verticalScale)(br), bg: colors.background.surface, ...styles, ...rest, children: children }) }); }; var _default = exports.default = Surface; //# sourceMappingURL=Surface.js.map