Add: CardIcon Component
This commit is contained in:
parent
9fa4655632
commit
331c9e42ec
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
&[data-horizontal] {
|
&[data-horizontal] {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
gap: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
42
src/comp/cardicon.svelte
Normal file
42
src/comp/cardicon.svelte
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<script>
|
||||||
|
import Card from "./card.svelte";
|
||||||
|
import Tablericon from "./tablericon.svelte";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
export let colorIcon = "var(--gray)";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
export let colorBackground = "var(--gray-dim)";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {string}
|
||||||
|
*/
|
||||||
|
export let iconName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {number}
|
||||||
|
*/
|
||||||
|
export let iconSize = 24;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.icon {
|
||||||
|
display: flex;
|
||||||
|
background: var(--card-bg);
|
||||||
|
padding: 8px;
|
||||||
|
border-radius: 8px;
|
||||||
|
aspect-ratio: 1 / 1;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<Card horizontal={true} background={colorBackground}>
|
||||||
|
<div class="icon">
|
||||||
|
<Tablericon color={colorIcon} name={iconName} size={iconSize}></Tablericon>
|
||||||
|
</div>
|
||||||
|
<slot />
|
||||||
|
</Card>
|
||||||
Loading…
x
Reference in New Issue
Block a user