Skip to content

Commit

Permalink
fix: Card Wrapper xl window size was being purged (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
staylorwr committed Sep 16, 2020
1 parent 386cc28 commit 7c3f977
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 7 additions & 7 deletions assets/src/components/CardWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default {
computed: {
widthClass () {
return this.size == 'large' ? 'w-full' : calculateCardWidth(this.card);
return this.card.width == 'full' ? 'w-full' : calculateCardWidth(this.card);
},
cardSizeClass () {
Expand All @@ -64,22 +64,22 @@ function calculateCardWidth (card) {
switch (card.width) {
case '1/2':
width = 'w-1/2';
width = 'xl:w-1/2';
break;
case '1/3':
width = 'w-1/3';
width = 'xl:w-1/3';
break;
case '2/3':
width = 'w-2/3';
width = 'xl:w-2/3';
break;
case '1/4':
width = 'w-1/4';
width = 'xl:w-1/4';
break;
case '3/4':
width = 'w-3/4';
width = 'xl:w-3/4';
break;
}
return `w-full lg:w-1/2 xl:${width}`;
return `w-full lg:w-1/2 ${width}`;
}
</script>
2 changes: 2 additions & 0 deletions lib/ex_teal/help_card.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ defmodule ExTeal.HelpCard do

use ExTeal.Card

@impl true
def width, do: "full"

@impl true
def component, do: "help-card"
end

0 comments on commit 7c3f977

Please sign in to comment.