Skip to content

Commit

Permalink
fix(Card): class is now reactive
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Howell committed Oct 11, 2022
1 parent 7700d0f commit 015c948
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/card/Action.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
const defaultClass =
'group relative w-full h-full cursor-pointer first:rounded-bl-md last:rounded-br-md overflow-hidden';
const finalClass = twMerge(defaultClass, $$props.class);
$: finalClass = twMerge(defaultClass, $$props.class);
</script>

<div
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/card/Actions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
const defaultClass =
'flex flex-row h-14 justify-evenly divide-x divide-light-icon-background dark:divide-dark-icon-background first:rounded-t-md last:rounded-b-md border border-l-0 border-b-0 border-r-0';
const finalClass = twMerge(defaultClass, $$props.class);
$: finalClass = twMerge(defaultClass, $$props.class);
</script>

<div
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/card/Card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
const defaultClass =
'bg-light-surface text-light-content dark:bg-dark-surface dark:text-dark-content rounded-md';
const finalClass = twMerge(defaultClass, $$props.class);
$: finalClass = twMerge(defaultClass, $$props.class);
</script>

<div
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/card/Content.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
});
const defaultClass = 'first:rounded-t-md last:rounded-b-md px-4 py-5 sm:px-6';
const finalClass = twMerge(defaultClass, $$props.class);
$: finalClass = twMerge(defaultClass, $$props.class);
</script>

<div
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/card/Cover.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
const defaultClass =
'mt-[-1px] mr-[-1px] ml-[-1px] last:h-[calc(100%+2px)] first:rounded-t-md last:rounded-b-md overflow-hidden';
const finalClass = twMerge(defaultClass, $$props.class);
$: finalClass = twMerge(defaultClass, $$props.class);
</script>

<div
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/card/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
const defaultClass =
'px-4 py-5 sm:px-6 h-16 first:rounded-t-md last:rounded-b-md border border-l-0 border-b-0 border-r-0';
const finalClass = twMerge(defaultClass, $$props.class);
$: finalClass = twMerge(defaultClass, $$props.class);
</script>

<div
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/card/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
defaultClass += ' border-b light-border dark:dark-border last:border-b-none';
}
defaultClass = twMerge(defaultClass, $$props.class);
$: finalClass = twMerge(defaultClass, $$props.class);
</script>

<div
class={defaultClass}
class={finalClass}
style={$$props.style}
use:useActions={use}
use:forwardEvents
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/card/Overlay.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
const defaultClass =
'bg-light-background bg-opacity-70 dark:bg-opacity-70 dark:bg-dark-background px-4 py-5 sm:px-6 first:rounded-t-md last:rounded-b-md absolute inset-0 flex flex-col';
const finalClass = twMerge(defaultClass, $$props.class);
$: finalClass = twMerge(defaultClass, $$props.class);
</script>

<div
Expand Down

0 comments on commit 015c948

Please sign in to comment.