website/src/lib/Hero.svelte

21 lines
494 B
Svelte
Raw Normal View History

2022-08-05 18:16:54 +05:30
<script lang="ts">
export let title: string = "";
export let description: string = "";
export let marginTop: string = "";
2022-08-17 23:38:10 +05:30
let styles: string = "";
export { styles as style };
2022-08-05 18:16:54 +05:30
</script>
2022-12-27 20:58:47 +05:30
<div
class="flex flex-col items-center justify-center children:(m-4 p-0 text-center)"
style="margin-top: {marginTop}%; {styles}"
>
2022-08-05 19:31:15 +05:30
{#if title}
2022-12-27 20:58:47 +05:30
<h1 class="text-5xl font-800 text-accent">{title}</h1>
2022-08-05 19:31:15 +05:30
{/if}
{#if description}
2022-12-27 20:58:47 +05:30
<p class="text-3xl text-text">{description}</p>
2022-08-05 19:31:15 +05:30
{/if}
<slot />
2022-08-05 18:16:54 +05:30
</div>