From 1159d82dc86e1469197d51ede33a829fe538e45b Mon Sep 17 00:00:00 2001 From: Viraj Ajay Joshi Date: Fri, 7 Jun 2024 11:50:09 +0530 Subject: [PATCH] fix: avatar image issue --- .../src/core-components/nativewind/avatar/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/example/storybook-nativewind/src/core-components/nativewind/avatar/index.tsx b/example/storybook-nativewind/src/core-components/nativewind/avatar/index.tsx index 36657a742..3c4438901 100644 --- a/example/storybook-nativewind/src/core-components/nativewind/avatar/index.tsx +++ b/example/storybook-nativewind/src/core-components/nativewind/avatar/index.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { createAvatar } from '@gluestack-ui/avatar'; -import { View, Text, Image } from 'react-native'; +import { View, Text, Image, Platform } from 'react-native'; import { tva } from '@gluestack-ui/nativewind-utils/tva'; import { @@ -166,6 +166,12 @@ export const AvatarImage = React.forwardRef( className={avatarImageStyle({ class: className, })} + //@ts-ignore + style={ + Platform.OS === 'web' + ? { height: 'revert-layer', width: 'revert-layer' } + : undefined + } /> ); }