Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

Commit

Permalink
Update code based on comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nbriannl committed Feb 16, 2020
1 parent 2a247ab commit 365e286
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions src/TipBox.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="alert container" :class="[boxStyle, addClass, lightStyle, seamlessStyle, hasBackground, hasBorder]" :style="customStyle">
<div class="alert container" :class="[boxStyle, addClass, lightStyle, seamlessStyle, noBackgroundStyle, noBorderStyle]" :style="customStyle">
<div v-if="hasIcon" class="icon-wrapper" :class="[iconStyle]">
<slot name="_icon">
<span v-html="iconType"></span>
Expand Down Expand Up @@ -114,19 +114,19 @@
lightStyle() {
if (this.light) {
switch (this.type) {
case 'warning':
return 'border-warning text-warning alert-border-left';
case 'info':
case 'definition':
return 'border-info text-info alert-border-left';
case 'success':
case 'tip':
return 'border-sucess text-success alert-border-left';
case 'important':
case 'wrong':
return 'border-danger text-danger alert-border-left';
default:
return '';
case 'warning':
return 'border-warning text-warning alert-border-left';
case 'info':
case 'definition':
return 'border-info text-info alert-border-left';
case 'success':
case 'tip':
return 'border-sucess text-success alert-border-left';
case 'important':
case 'wrong':
return 'border-danger text-danger alert-border-left';
default:
return '';
}
}
return '';
Expand Down Expand Up @@ -181,6 +181,8 @@
return '<i class="fas fa-lightbulb"></i>';
case 'definition':
return '<i class="fas fa-atlas"></i>';
default:
return '';
}
},
iconStyle() {
Expand All @@ -189,15 +191,17 @@
}
return '';
},
hasBackground() {
noBackgroundStyle() {
if (this.noBackground) {
return 'no-background';
}
return '';
},
hasBorder() {
noBorderStyle() {
if (this.noBorder) {
return 'no-border';
}
return '';
}
}
}
Expand Down

0 comments on commit 365e286

Please sign in to comment.