Skip to content

Commit

Permalink
Merge pull request #1637 from gluestack/fix/config-image
Browse files Browse the repository at this point in the history
fix: image height width set to revert-layer
  • Loading branch information
Viraj-10 authored Jan 15, 2024
2 parents fff9a33 + 9e29e11 commit 25d99c6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/config/src/theme/Image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down Expand Up @@ -44,6 +53,7 @@ export const Image = createStyle({
},
},
},

defaultProps: {
size: 'md',
},
Expand Down

0 comments on commit 25d99c6

Please sign in to comment.