Skip to content

Commit

Permalink
Fix color in MDBCard
Browse files Browse the repository at this point in the history
  • Loading branch information
SauravKanchan committed May 22, 2020
1 parent d424a1a commit 454ae7b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
8 changes: 5 additions & 3 deletions src/MDBCard.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<script>
import {clean, clsx ,forwardEventsBuilder} from './utils';
import {clean, clsx, forwardEventsBuilder, getColorClass} from './utils';
import {current_component} from 'svelte/internal';
const forwardEvents = forwardEventsBuilder(current_component);
let className = '';
let className = '';
export {className as class};
export let body = false;
export let color = '';
Expand All @@ -19,7 +20,8 @@ let className = '';
'card',
inverse ? 'text-white' : false,
body ? 'card-body' : false,
color ? `${outline ? 'border' : 'bg'}-${color}` : false
(color & outline) ? `border-${color}` : false,
(color && !outline) ? `${getColorClass(color)}` : false
);
</script>

Expand Down
8 changes: 0 additions & 8 deletions stories/Cards/Index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,3 @@
<Example source={CardGroupSource} textCenter={false}>
<CardGroup/>
</Example>
<h2 class="section-heading mb-4">
Nesting
</h2>
<p>Place a <code>&lt;MDBBtnGroup&gt;</code> within another <code>&lt;MDBBtnGroup&gt;</code> when you want dropdown
menus mixed with
a
series of buttons.
</p>
2 changes: 1 addition & 1 deletion stories/Charts/Installation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<h4 class="text-center h4 m-5">This package is separate from mdbsvelte. It's a wrapper of <a
href="https://www.chartjs.org/"
target="_blank">chart.js</a>
<MDBBtn color="dark" size="lg" href="https://github.com/SauravKanchan/svelte-chartjs" target="_blank">
<MDBBtn color="dark" href="https://github.com/SauravKanchan/svelte-chartjs" target="_blank">
<MDBIcon fab icon="github" size="2x" class="ml-1"/>
</MDBBtn>
</h4>
Expand Down

0 comments on commit 454ae7b

Please sign in to comment.