mirror of
https://github.com/wukko/cobalt.git
synced 2025-01-22 10:46:19 +01:00
web/components: add BulletExplain
component
This commit is contained in:
parent
26e051fcd8
commit
152ba6d443
1 changed files with 72 additions and 0 deletions
72
web/src/components/misc/BulletExplain.svelte
Normal file
72
web/src/components/misc/BulletExplain.svelte
Normal file
|
@ -0,0 +1,72 @@
|
|||
<script lang="ts">
|
||||
export let title: string;
|
||||
export let description: string;
|
||||
export let icon: ConstructorOfATypedSvelteComponent;
|
||||
</script>
|
||||
|
||||
<div class="bullet-holder">
|
||||
<div class="bullet-icon">
|
||||
<svelte:component this={icon} />
|
||||
</div>
|
||||
<div class="bullet-content">
|
||||
<div class="bullet-title">
|
||||
{title}
|
||||
</div>
|
||||
<div class="subtext bullet-description">
|
||||
{description}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.bullet-holder {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
text-align: left;
|
||||
gap: var(--padding);
|
||||
}
|
||||
|
||||
.bullet-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: calc(var(--padding) / 2);
|
||||
}
|
||||
|
||||
.bullet-title {
|
||||
color: var(--secondary);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
font-weight: 500;
|
||||
gap: var(--padding);
|
||||
}
|
||||
|
||||
.bullet-description {
|
||||
padding: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.bullet-icon {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.bullet-icon :global(svg) {
|
||||
width: 21px;
|
||||
height: 21px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 535px) {
|
||||
.bullet-content {
|
||||
gap: calc(var(--padding) / 2.5);
|
||||
}
|
||||
|
||||
.bullet-title {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.bullet-icon :global(svg) {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in a new issue