2021-06-01 16:14:24 +02:00
|
|
|
<script>
|
2021-11-08 00:24:53 +01:00
|
|
|
import Icon from "../utils/Icon.svelte";
|
|
|
|
import Form from "../utils/Form.svelte";
|
2021-06-01 16:14:24 +02:00
|
|
|
|
|
|
|
export let href;
|
|
|
|
export let icon;
|
|
|
|
export let text;
|
|
|
|
export let action = false;
|
|
|
|
</script>
|
|
|
|
|
2021-11-08 00:24:53 +01:00
|
|
|
<style lang="scss">
|
|
|
|
@import "../../scss/helpers";
|
|
|
|
|
|
|
|
li {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
|
|
@include medium-le {
|
|
|
|
margin-top: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include large-ge {
|
|
|
|
margin-left: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
a {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
width: 100%;
|
|
|
|
height: auto;
|
|
|
|
padding: 8px;
|
|
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: rgba(0, 0, 0, 0.07);
|
|
|
|
|
|
|
|
@include darkMode {
|
|
|
|
background-color: rgba(255, 255, 255, 0.07);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
}
|
|
|
|
|
|
|
|
:global(form) {
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
:global(button) {
|
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
|
|
|
margin: 0;
|
|
|
|
padding: 8px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
:global(.feather) {
|
|
|
|
--icon-size: 16px;
|
|
|
|
margin-right: 8px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
2021-06-01 16:14:24 +02:00
|
|
|
|
|
|
|
<li>
|
|
|
|
{#if action}
|
2021-11-08 00:24:53 +01:00
|
|
|
<Form action={href} submitIcon={icon} submitText={text}/>
|
2021-06-01 16:14:24 +02:00
|
|
|
{:else}
|
|
|
|
<a href={href}>
|
2021-11-08 00:24:53 +01:00
|
|
|
<Icon name={icon}/>
|
|
|
|
<span class="tip">{text}</span></a>
|
2021-06-01 16:14:24 +02:00
|
|
|
{/if}
|
|
|
|
</li>
|