Skip to content

Commit

Permalink
Added fullHeight property to Ui.Image.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdotdesign committed Apr 26, 2021
1 parent c46f633 commit 729a3d6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions source/Image.mint
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ component Ui.Image {
/* Whether or not the image should have a background color. */
property transparent : Bool = false

/* Whether or not the image fills the height of it's parent element. */
property fullHeight : Bool = false

/* Whether or not the image fills the width of it's parent element. */
property fullWidth : Bool = false

Expand Down Expand Up @@ -74,12 +77,16 @@ component Ui.Image {

/* The style for the base. */
style base {
height: #{Ui.Size.toString(height)};

if (!transparent) {
background: var(--content-faded-color);
}

if (fullHeight) {
height: 100%;
} else {
height: #{Ui.Size.toString(height)};
}

if (fullWidth) {
width: 100%;
} else {
Expand Down

0 comments on commit 729a3d6

Please sign in to comment.