UNPKG

@nexara/nativeflow

Version:

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

40 lines (39 loc) 1.1 kB
"use strict"; import React from "react"; import { Image } from "react-native"; import { StyledView } from "../StyledComponents/index.js"; import { verticalScale } from "../../helpers/ResponsiveCalculations.js"; import { useTheme } from "../../hooks/index.js"; import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime"; const AvatarImage = ({ size = 70, source, bg, resizeMode = 'cover', containerStyle, imageStyle }) => { const theme = useTheme(); return /*#__PURE__*/_jsx(_Fragment, { children: /*#__PURE__*/_jsx(StyledView, { backgroundColor: bg ?? theme.colors.primary // alignSelf='flex-start' , height: verticalScale(size), width: verticalScale(size), borderRadius: verticalScale(size), overflow: "hidden", style: containerStyle, children: /*#__PURE__*/_jsx(Image, { source: source, style: [{ height: '100%', width: '100%' }, imageStyle], resizeMode: resizeMode }) }) }); }; export default AvatarImage; //# sourceMappingURL=AvatarImage.js.map