Skip to content

Commit

Permalink
feat: add hint text
Browse files Browse the repository at this point in the history
  • Loading branch information
CrackThrough committed Dec 20, 2023
1 parent 7a7826e commit a467023
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions src/components/atoms/auth/Hint.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<script lang="ts">
export let warn: boolean = false;
</script>

<div class="hint">
{#if warn}
<div class="warn-marker" />
<p class="warn">
<slot />
</p>
{:else}
<p class="normal">
<slot />
</p>
{/if}
</div>

<style lang="scss">
.hint {
display: flex;
flex-direction: row;
column-gap: 6px;
align-items: center;
.normal {
font-size: 12px;
}
.warn {
font-size: 14px;
color: rgb(var(--color-red));
}
.warn-marker {
width: 8px;
height: 8px;
border-radius: 100%;
background-color: rgb(var(--color-red));
}
}
</style>

0 comments on commit a467023

Please sign in to comment.