gitbutler/apps/desktop/src/lib/shared/IconLink.svelte
Pavel Laptev daa285f41e
Login flow update and UI updated (#4716)
* UI: Fix disabled `WelcomeAction` state

* update stories structure

* update UI components structure

* fix path to icons.json

* fix path to `timeAgo` functions

* added `LinkButton` component and updated login functions

* copy change

* remove `console.log`

* lint: formatting fixes

* remove `console.log` from the `Modal` story

* casing change

* remove duplicated folders (casing issue)
2024-08-19 11:55:19 +02:00

34 lines
721 B
Svelte

<script lang="ts">
export let href: string;
import Icon from '@gitbutler/ui/Icon.svelte';
import type iconsJson from '@gitbutler/ui/data/icons.json';
export let icon: keyof typeof iconsJson;
</script>
<a class="link" target="_blank" {href}>
<Icon name={icon} />
<span class="text-12"><slot /></span>
</a>
<style lang="postcss">
.link {
display: flex;
align-items: center;
width: fit-content;
gap: 10px;
padding: 4px 6px;
border-radius: var(--radius-m);
color: var(--clr-scale-ntrl-40);
text-decoration: none;
transition: background-color var(--transition-fast);
&:hover {
color: var(--clr-text-1);
background-color: oklch(from var(--clr-scale-ntrl-0) l c h / 0.05);
}
}
</style>