From 9e29e11fc0060d45b4f40f69bd8222cfb28a30ca Mon Sep 17 00:00:00 2001 From: Suraj Date: Mon, 15 Jan 2024 15:38:12 +0530 Subject: [PATCH] fix: image height width set to revert-layer --- packages/config/src/theme/Image.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/config/src/theme/Image.ts b/packages/config/src/theme/Image.ts index 7c6ec1bc73..1758c0f490 100644 --- a/packages/config/src/theme/Image.ts +++ b/packages/config/src/theme/Image.ts @@ -2,6 +2,15 @@ import { createStyle } from '@gluestack-style/react'; export const Image = createStyle({ maxWidth: '$full', + _web: { + props: { + // set property to revert-layer as RNW always set image height width inline + style: { + height: 'revert-layer', + width: 'revert-layer', + }, + }, + }, variants: { size: { '2xs': { @@ -44,6 +53,7 @@ export const Image = createStyle({ }, }, }, + defaultProps: { size: 'md', },