Skip to content

Commit

Permalink
Added 'h' prop to Tex component. Improved logic of contain logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
michielvandergeest committed Oct 9, 2023
1 parent 4cf3fd3 commit 6e4a333
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Text.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default () =>
stretch="$stretch"
contain="$_contain"
:w="$w"
:h="$h"
:textAlign="$align"
@loaded="$@loaded"
@error="$@error"
Expand All @@ -54,6 +55,7 @@ export default () =>
'stretch',
'align',
'w',
'h',
'contain',
'@loaded',
'@error',
Expand All @@ -63,7 +65,7 @@ export default () =>
return this.slotcontent || this.content || ''
},
_contain() {
return this.contain || (this.align ? 'width' : null)
return this.contain || (this.w && this.h ? 'both' : this.w ? 'width' : 'none')
},
},
})

0 comments on commit 6e4a333

Please sign in to comment.