mirror of
https://github.com/coracle-social/coracle.git
synced 2024-09-18 19:23:40 +00:00
Get rid of Button component
This commit is contained in:
parent
043ef6c33c
commit
9c446263a6
@ -222,7 +222,7 @@
|
|||||||
</MultiSelect>
|
</MultiSelect>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<Anchor type="button-accent" on:click={submit}>Apply Filters</Anchor>
|
<Anchor theme="button-accent" on:click={submit}>Apply Filters</Anchor>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Anchor from 'src/partials/Anchor.svelte'
|
import Anchor from "src/partials/Anchor.svelte"
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="-ml-12 mt-8 mb-4 flex justify-center pointer-events-none">
|
<div class="pointer-events-none -ml-12 mt-8 mb-4 flex justify-center">
|
||||||
<Anchor type="button">See more</Anchor>
|
<Anchor theme="button">See more</Anchor>
|
||||||
</div>
|
</div>
|
||||||
|
@ -46,11 +46,11 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if isFollowing}
|
{#if isFollowing}
|
||||||
<Anchor type="button-accent" stopPropagation on:click={() => removePetname(person)}>
|
<Anchor theme="button-accent" stopPropagation on:click={() => removePetname(person)}>
|
||||||
Following
|
Following
|
||||||
</Anchor>
|
</Anchor>
|
||||||
{:else}
|
{:else}
|
||||||
<Anchor type="button" stopPropagation on:click={() => addPetname(person)}>Follow</Anchor>
|
<Anchor theme="button" stopPropagation on:click={() => addPetname(person)}>Follow</Anchor>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<p class="overflow-hidden text-ellipsis">
|
<p class="overflow-hidden text-ellipsis">
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
<div class="relative flex flex-col gap-4 py-2 px-3">
|
<div class="relative flex flex-col gap-4 py-2 px-3">
|
||||||
<div class="flex justify-between gap-2">
|
<div class="flex justify-between gap-2">
|
||||||
<Anchor type="unstyled" href={routes.person($person.pubkey)} class="flex gap-4">
|
<Anchor theme="unstyled" href={routes.person($person.pubkey)} class="flex gap-4">
|
||||||
<PersonCircle size={14} person={$person} />
|
<PersonCircle size={14} person={$person} />
|
||||||
<div class="flex flex-grow flex-col gap-2">
|
<div class="flex flex-grow flex-col gap-2">
|
||||||
<h2 class="text-lg">{displayPerson($person)}</h2>
|
<h2 class="text-lg">{displayPerson($person)}</h2>
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
<div class="flex items-center justify-between gap-2">
|
<div class="flex items-center justify-between gap-2">
|
||||||
<div class="flex items-center gap-2 text-xl">
|
<div class="flex items-center gap-2 text-xl">
|
||||||
<i class={relay.url.startsWith("ws://") ? "fa fa-unlock" : "fa fa-lock"} />
|
<i class={relay.url.startsWith("ws://") ? "fa fa-unlock" : "fa fa-lock"} />
|
||||||
<Anchor type="unstyled" on:click={openModal}>{displayRelay(relay)}</Anchor>
|
<Anchor theme="unstyled" on:click={openModal}>{displayRelay(relay)}</Anchor>
|
||||||
{#if showStatus}
|
{#if showStatus}
|
||||||
<span
|
<span
|
||||||
on:mouseout={() => {
|
on:mouseout={() => {
|
||||||
|
@ -28,8 +28,7 @@
|
|||||||
onChunk,
|
onChunk,
|
||||||
})
|
})
|
||||||
|
|
||||||
const loadMessages = onChunk =>
|
const loadMessages = onChunk => cursor.loadPage({filter: {kinds: [42], "#e": [id]}, onChunk})
|
||||||
cursor.loadPage({filter: {kinds: [42], "#e": [id]}, onChunk})
|
|
||||||
|
|
||||||
const edit = () => {
|
const edit = () => {
|
||||||
modal.push({type: "room/edit", room: $room})
|
modal.push({type: "room/edit", room: $room})
|
||||||
@ -48,7 +47,7 @@
|
|||||||
<Channel {loadMessages} {listenForMessages} {sendMessage}>
|
<Channel {loadMessages} {listenForMessages} {sendMessage}>
|
||||||
<div slot="header" class="flex items-start gap-4 p-4">
|
<div slot="header" class="flex items-start gap-4 p-4">
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
<Anchor type="unstyled" class="fa fa-arrow-left cursor-pointer text-2xl" href="/chat" />
|
<Anchor theme="unstyled" class="fa fa-arrow-left cursor-pointer text-2xl" href="/chat" />
|
||||||
<div
|
<div
|
||||||
class="h-12 w-12 shrink-0 overflow-hidden rounded-full border border-solid border-white bg-cover bg-center"
|
class="h-12 w-12 shrink-0 overflow-hidden rounded-full border border-solid border-white bg-cover bg-center"
|
||||||
style="background-image: url({$room.picture})" />
|
style="background-image: url({$room.picture})" />
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
import Input from "src/partials/Input.svelte"
|
import Input from "src/partials/Input.svelte"
|
||||||
import Content from "src/partials/Content.svelte"
|
import Content from "src/partials/Content.svelte"
|
||||||
import Textarea from "src/partials/Textarea.svelte"
|
import Textarea from "src/partials/Textarea.svelte"
|
||||||
import Button from "src/partials/Button.svelte"
|
import Anchor from "src/partials/Anchor.svelte"
|
||||||
import {toast, modal} from "src/partials/state"
|
import {toast, modal} from "src/partials/state"
|
||||||
import {getUserWriteRelays} from "src/agent/relays"
|
import {getUserWriteRelays} from "src/agent/relays"
|
||||||
import user from "src/agent/user"
|
import user from "src/agent/user"
|
||||||
@ -78,7 +78,7 @@
|
|||||||
<input type="file" name="picture" />
|
<input type="file" name="picture" />
|
||||||
<p class="text-sm text-gray-1">A picture to help people remember your room.</p>
|
<p class="text-sm text-gray-1">A picture to help people remember your room.</p>
|
||||||
</div>
|
</div>
|
||||||
<Button type="submit" class="text-center">Done</Button>
|
<Anchor tag="button" theme="button" type="submit" class="text-center">Done</Anchor>
|
||||||
</div>
|
</div>
|
||||||
</Content>
|
</Content>
|
||||||
</form>
|
</form>
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
<i class="fa fa-server fa-lg" />
|
<i class="fa fa-server fa-lg" />
|
||||||
<h2 class="staatliches text-2xl">Your rooms</h2>
|
<h2 class="staatliches text-2xl">Your rooms</h2>
|
||||||
</div>
|
</div>
|
||||||
<Anchor type="button-accent" on:click={() => modal.push({type: "room/edit"})}>
|
<Anchor theme="button-accent" on:click={() => modal.push({type: "room/edit"})}>
|
||||||
<i class="fa-solid fa-plus" /> Create Room
|
<i class="fa-solid fa-plus" /> Create Room
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,12 +30,12 @@
|
|||||||
<h2 class="text-lg">{room.name || ""}</h2>
|
<h2 class="text-lg">{room.name || ""}</h2>
|
||||||
</div>
|
</div>
|
||||||
{#if joined}
|
{#if joined}
|
||||||
<Anchor type="button" killEvent class="flex items-center gap-2" on:click={leave}>
|
<Anchor theme="button" killEvent class="flex items-center gap-2" on:click={leave}>
|
||||||
<i class="fa fa-right-from-bracket" />
|
<i class="fa fa-right-from-bracket" />
|
||||||
<span>Leave</span>
|
<span>Leave</span>
|
||||||
</Anchor>
|
</Anchor>
|
||||||
{:else if $canPublish}
|
{:else if $canPublish}
|
||||||
<Anchor type="button" killEvent class="flex items-center gap-2" on:click={join}>
|
<Anchor theme="button" killEvent class="flex items-center gap-2" on:click={join}>
|
||||||
<i class="fa fa-right-to-bracket" />
|
<i class="fa fa-right-to-bracket" />
|
||||||
<span>Join</span>
|
<span>Join</span>
|
||||||
</Anchor>
|
</Anchor>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
import Heading from "src/partials/Heading.svelte"
|
import Heading from "src/partials/Heading.svelte"
|
||||||
import PersonBadge from "src/app/shared/PersonBadge.svelte"
|
import PersonBadge from "src/app/shared/PersonBadge.svelte"
|
||||||
import Content from "src/partials/Content.svelte"
|
import Content from "src/partials/Content.svelte"
|
||||||
import Button from "src/partials/Button.svelte"
|
import Anchor from "src/partials/Anchor.svelte"
|
||||||
import Input from "src/partials/Input.svelte"
|
import Input from "src/partials/Input.svelte"
|
||||||
import MultiSelect from "src/partials/MultiSelect.svelte"
|
import MultiSelect from "src/partials/MultiSelect.svelte"
|
||||||
import {searchTopics, searchPeople, searchRelays, getPersonWithFallback} from "src/agent/db"
|
import {searchTopics, searchPeople, searchRelays, getPersonWithFallback} from "src/agent/db"
|
||||||
@ -92,7 +92,7 @@
|
|||||||
will be used.
|
will be used.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Button type="submit" class="text-center">Save</Button>
|
<Anchor tag="button" theme="button" type="submit" class="text-center">Save</Anchor>
|
||||||
</div>
|
</div>
|
||||||
</Content>
|
</Content>
|
||||||
</form>
|
</form>
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<Content>
|
<Content>
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<Heading>Your Lists</Heading>
|
<Heading>Your Lists</Heading>
|
||||||
<Anchor type="button-accent" on:click={createFeed}>
|
<Anchor theme="button-accent" on:click={createFeed}>
|
||||||
<i class="fa fa-plus" /> List
|
<i class="fa fa-plus" /> List
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<Content size="lg">
|
<Content size="lg">
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<Heading>Select a List</Heading>
|
<Heading>Select a List</Heading>
|
||||||
<Anchor type="button-accent" on:click={() => selectlist({})}>
|
<Anchor theme="button-accent" on:click={() => selectlist({})}>
|
||||||
<i class="fa fa-plus" /> List
|
<i class="fa fa-plus" /> List
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<Anchor class="w-32 text-center" type="button-accent" on:click={autoLogIn}>Log In</Anchor>
|
<Anchor class="w-32 text-center" type="button-accent" on:click={autoLogIn}>Log In</Anchor>
|
||||||
<Anchor class="w-32 text-center" type="button" on:click={signUp}>Sign Up</Anchor>
|
<Anchor class="w-32 text-center" type="button" on:click={signUp}>Sign Up</Anchor>
|
||||||
</div>
|
</div>
|
||||||
<Anchor type="unstyled" on:click={pubkeyLogIn}>
|
<Anchor theme="unstyled" on:click={pubkeyLogIn}>
|
||||||
<i class="fa fa-cogs" /> Advanced Login
|
<i class="fa fa-cogs" /> Advanced Login
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</div>
|
</div>
|
||||||
|
@ -165,7 +165,7 @@
|
|||||||
<Input bind:value={customRelayUrl} wrapperClass="flex-grow">
|
<Input bind:value={customRelayUrl} wrapperClass="flex-grow">
|
||||||
<i slot="before" class="fa fa-search" />
|
<i slot="before" class="fa fa-search" />
|
||||||
</Input>
|
</Input>
|
||||||
<Anchor type="button" on:click={addCustomRelay}>Search relay</Anchor>
|
<Anchor theme="button" on:click={addCustomRelay}>Search relay</Anchor>
|
||||||
</form>
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<i slot="before" class="fa fa-key" />
|
<i slot="before" class="fa fa-key" />
|
||||||
</Input>
|
</Input>
|
||||||
</div>
|
</div>
|
||||||
<Anchor type="button" on:click={logIn}>Log In</Anchor>
|
<Anchor theme="button" on:click={logIn}>Log In</Anchor>
|
||||||
</div>
|
</div>
|
||||||
{#if !Capacitor.isNativePlatform()}
|
{#if !Capacitor.isNativePlatform()}
|
||||||
<p class="rounded border-2 border-solid border-warning bg-gray-8 py-3 px-6">
|
<p class="rounded border-2 border-solid border-warning bg-gray-8 py-3 px-6">
|
||||||
|
@ -37,6 +37,6 @@
|
|||||||
<i slot="before" class="fa fa-key" />
|
<i slot="before" class="fa fa-key" />
|
||||||
</Input>
|
</Input>
|
||||||
</div>
|
</div>
|
||||||
<Anchor type="button" on:click={logIn}>Log In</Anchor>
|
<Anchor theme="button" on:click={logIn}>Log In</Anchor>
|
||||||
</div>
|
</div>
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
{:else}
|
{:else}
|
||||||
<div class="flex flex-col items-center gap-8" in:fly={{y: 20}}>
|
<div class="flex flex-col items-center gap-8" in:fly={{y: 20}}>
|
||||||
<div>Are you sure you want to log out? All data will be cleared.</div>
|
<div>Are you sure you want to log out? All data will be cleared.</div>
|
||||||
<Anchor type="button" on:click={confirm}>Log out</Anchor>
|
<Anchor theme="button" on:click={confirm}>Log out</Anchor>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
<div class="flex w-full flex-col gap-2">
|
<div class="flex w-full flex-col gap-2">
|
||||||
<div class="flex w-full items-center justify-between">
|
<div class="flex w-full items-center justify-between">
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
<Anchor type="unstyled" href={routes.person(pubkey)} class="text-lg font-bold">
|
<Anchor theme="unstyled" href={routes.person(pubkey)} class="text-lg font-bold">
|
||||||
{displayPerson($person)}
|
{displayPerson($person)}
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
import {writable} from "svelte/store"
|
import {writable} from "svelte/store"
|
||||||
import {annotateMedia} from "src/util/misc"
|
import {annotateMedia} from "src/util/misc"
|
||||||
import {displayPerson} from "src/util/nostr"
|
import {displayPerson} from "src/util/nostr"
|
||||||
import Button from "src/partials/Button.svelte"
|
import Anchor from "src/partials/Anchor.svelte"
|
||||||
import Compose from "src/partials/Compose.svelte"
|
import Compose from "src/partials/Compose.svelte"
|
||||||
import ImageInput from "src/partials/ImageInput.svelte"
|
import ImageInput from "src/partials/ImageInput.svelte"
|
||||||
import Media from "src/partials/Media.svelte"
|
import Media from "src/partials/Media.svelte"
|
||||||
@ -149,7 +149,8 @@
|
|||||||
}} />
|
}} />
|
||||||
{/if}
|
{/if}
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<Button type="submit" class="flex-grow text-center">Send</Button>
|
<Anchor tag="button" theme="button" type="submit" class="flex-grow text-center"
|
||||||
|
>Send</Anchor>
|
||||||
<ImageInput bind:value={image} icon="image" hideInput />
|
<ImageInput bind:value={image} icon="image" hideInput />
|
||||||
</div>
|
</div>
|
||||||
<small
|
<small
|
||||||
@ -202,7 +203,8 @@
|
|||||||
</RelayCard>
|
</RelayCard>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<Button type="submit" class="w-full text-center">Done</Button>
|
<Anchor tag="button" theme="button" type="submit" class="w-full text-center"
|
||||||
|
>Done</Anchor>
|
||||||
</div>
|
</div>
|
||||||
</RelaySearch>
|
</RelaySearch>
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -19,6 +19,6 @@
|
|||||||
note?
|
note?
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-center">
|
<div class="flex justify-center">
|
||||||
<Anchor type="button" on:click={confirm}>Confirm</Anchor>
|
<Anchor theme="button" on:click={confirm}>Confirm</Anchor>
|
||||||
</div>
|
</div>
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -29,8 +29,9 @@
|
|||||||
<div class="border-l-2 border-solid border-gray-6 pl-4">
|
<div class="border-l-2 border-solid border-gray-6 pl-4">
|
||||||
<Compose bind:this={compose} {onSubmit} />
|
<Compose bind:this={compose} {onSubmit} />
|
||||||
</div>
|
</div>
|
||||||
<Anchor type="button-accent" class="flex-grow text-center" on:click={onSubmit}>Say Hello!</Anchor>
|
<Anchor theme="button-accent" class="flex-grow text-center" on:click={onSubmit}
|
||||||
<Anchor type="unstyled" class="text-center" on:click={skip}>
|
>Say Hello!</Anchor>
|
||||||
|
<Anchor theme="unstyled" class="text-center" on:click={skip}>
|
||||||
Skip and see your feed <i class="fa fa-arrow-right" />
|
Skip and see your feed <i class="fa fa-arrow-right" />
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</Content>
|
</Content>
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<div class="flex items-start justify-between gap-4">
|
<div class="flex items-start justify-between gap-4">
|
||||||
<div class="flex flex-grow flex-col gap-2">
|
<div class="flex flex-grow flex-col gap-2">
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<Anchor type="unstyled" href={routes.person(pubkey)}>
|
<Anchor theme="unstyled" href={routes.person(pubkey)}>
|
||||||
<h1 class="text-2xl">
|
<h1 class="text-2xl">
|
||||||
{displayPerson($person)}
|
{displayPerson($person)}
|
||||||
</h1>
|
</h1>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<i class="fa fa-server fa-lg" />
|
<i class="fa fa-server fa-lg" />
|
||||||
<h2 class="staatliches text-2xl">Your relays</h2>
|
<h2 class="staatliches text-2xl">Your relays</h2>
|
||||||
</div>
|
</div>
|
||||||
<Anchor type="button-accent" on:click={() => modal.push({type: "relay/browse"})}>
|
<Anchor theme="button-accent" on:click={() => modal.push({type: "relay/browse"})}>
|
||||||
<i class="fa-solid fa-compass" /> Browse Relays
|
<i class="fa-solid fa-compass" /> Browse Relays
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {fly} from "src/util/transition"
|
import {fly} from "src/util/transition"
|
||||||
import {modal} from "src/partials/state"
|
import {modal} from "src/partials/state"
|
||||||
import Button from "src/partials/Button.svelte"
|
import Anchor from "src/partials/Anchor.svelte"
|
||||||
import Content from "src/partials/Content.svelte"
|
import Content from "src/partials/Content.svelte"
|
||||||
import Heading from "src/partials/Heading.svelte"
|
import Heading from "src/partials/Heading.svelte"
|
||||||
import Compose from "src/partials/Compose.svelte"
|
import Compose from "src/partials/Compose.svelte"
|
||||||
@ -48,7 +48,7 @@
|
|||||||
class="shadow-inset rounded bg-input text-black"
|
class="shadow-inset rounded bg-input text-black"
|
||||||
style="min-height: 6rem"
|
style="min-height: 6rem"
|
||||||
bind:this={compose} />
|
bind:this={compose} />
|
||||||
<Button type="submit" class="flex-grow text-center">Send</Button>
|
<Anchor tag="button" theme="button" type="submit" class="flex-grow text-center">Send</Anchor>
|
||||||
</div>
|
</div>
|
||||||
</Content>
|
</Content>
|
||||||
</form>
|
</form>
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
import ImageInput from "src/partials/ImageInput.svelte"
|
import ImageInput from "src/partials/ImageInput.svelte"
|
||||||
import Textarea from "src/partials/Textarea.svelte"
|
import Textarea from "src/partials/Textarea.svelte"
|
||||||
import Anchor from "src/partials/Anchor.svelte"
|
import Anchor from "src/partials/Anchor.svelte"
|
||||||
import Button from "src/partials/Button.svelte"
|
|
||||||
import Content from "src/partials/Content.svelte"
|
import Content from "src/partials/Content.svelte"
|
||||||
import Heading from "src/partials/Heading.svelte"
|
import Heading from "src/partials/Heading.svelte"
|
||||||
import user from "src/agent/user"
|
import user from "src/agent/user"
|
||||||
@ -100,7 +99,7 @@
|
|||||||
In most clients, this image will be shown on your profile page.
|
In most clients, this image will be shown on your profile page.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Button type="submit" class="text-center">Save</Button>
|
<Anchor tag="button" theme="button" type="submit" class="text-center">Save</Anchor>
|
||||||
</div>
|
</div>
|
||||||
</Content>
|
</Content>
|
||||||
</form>
|
</form>
|
||||||
|
@ -2,9 +2,8 @@
|
|||||||
import {fly} from "src/util/transition"
|
import {fly} from "src/util/transition"
|
||||||
import {toast, appName} from "src/partials/state"
|
import {toast, appName} from "src/partials/state"
|
||||||
import Toggle from "src/partials/Toggle.svelte"
|
import Toggle from "src/partials/Toggle.svelte"
|
||||||
import Anchor from "src/partials/Anchor.svelte"
|
|
||||||
import Input from "src/partials/Input.svelte"
|
import Input from "src/partials/Input.svelte"
|
||||||
import Button from "src/partials/Button.svelte"
|
import Anchor from "src/partials/Anchor.svelte"
|
||||||
import Content from "src/partials/Content.svelte"
|
import Content from "src/partials/Content.svelte"
|
||||||
import Heading from "src/partials/Heading.svelte"
|
import Heading from "src/partials/Heading.svelte"
|
||||||
import user from "src/agent/user"
|
import user from "src/agent/user"
|
||||||
@ -94,7 +93,7 @@
|
|||||||
and to diagnose and fix bugs.
|
and to diagnose and fix bugs.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<Button type="submit" class="text-center">Save</Button>
|
<Anchor tag="button" theme="button" type="submit" class="text-center">Save</Anchor>
|
||||||
</div>
|
</div>
|
||||||
</Content>
|
</Content>
|
||||||
</form>
|
</form>
|
||||||
|
@ -9,8 +9,10 @@
|
|||||||
export let killEvent = false
|
export let killEvent = false
|
||||||
export let external = false
|
export let external = false
|
||||||
export let loading = false
|
export let loading = false
|
||||||
export let type = "anchor"
|
export let theme = "anchor"
|
||||||
|
export let type = null
|
||||||
export let href = null
|
export let href = null
|
||||||
|
export let tag = "a"
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
@ -23,7 +25,7 @@
|
|||||||
$$props.class,
|
$$props.class,
|
||||||
"cursor-pointer transition-all",
|
"cursor-pointer transition-all",
|
||||||
{"opacity-50": loading},
|
{"opacity-50": loading},
|
||||||
switcher(type, {
|
switcher(theme, {
|
||||||
anchor: "underline",
|
anchor: "underline",
|
||||||
button:
|
button:
|
||||||
"py-2 px-4 rounded-full bg-input text-accent whitespace-nowrap border border-solid border-gray-6 hover:bg-input-hover",
|
"py-2 px-4 rounded-full bg-input text-accent whitespace-nowrap border border-solid border-gray-6 hover:bg-input-hover",
|
||||||
@ -55,6 +57,16 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<a class={className} on:click={onClick} href={_href} {target}>
|
{#if tag === "a"}
|
||||||
<slot />
|
<a class={className} on:click={onClick} href={_href} {target}>
|
||||||
</a>
|
<slot />
|
||||||
|
</a>
|
||||||
|
{:else if tag === "button"}
|
||||||
|
<button class={className} on:click={onClick} {type}>
|
||||||
|
<slot />
|
||||||
|
</button>
|
||||||
|
{:else}
|
||||||
|
<svelte:element this={tag} class={className} on:click={onClick}>
|
||||||
|
<slot />
|
||||||
|
</svelte:element>
|
||||||
|
{/if}
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
<script>
|
|
||||||
import cx from "classnames"
|
|
||||||
import {switcher} from "hurdak/lib/hurdak"
|
|
||||||
|
|
||||||
export let theme = "default"
|
|
||||||
export let disabled = false
|
|
||||||
|
|
||||||
const className = cx(
|
|
||||||
$$props.class,
|
|
||||||
"py-2 px-4 rounded-full cursor-pointer border border-solid transition-all",
|
|
||||||
{"text-gray-5": disabled},
|
|
||||||
switcher(theme, {
|
|
||||||
default: "bg-input text-accent border-gray-6 hover:bg-input-hover",
|
|
||||||
accent: "text-white bg-accent border-accent-light hover:bg-accent-light",
|
|
||||||
})
|
|
||||||
)
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<button on:click {...$$props} class={className}>
|
|
||||||
<slot />
|
|
||||||
</button>
|
|
@ -72,7 +72,7 @@
|
|||||||
}}>
|
}}>
|
||||||
<slot name="button">
|
<slot name="button">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<Anchor type="button">
|
<Anchor theme="button">
|
||||||
<i class="fa fa-upload" />
|
<i class="fa fa-upload" />
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</div>
|
</div>
|
||||||
@ -87,8 +87,8 @@
|
|||||||
<p>Please accept the following terms:</p>
|
<p>Please accept the following terms:</p>
|
||||||
<p>{quote.terms}</p>
|
<p>{quote.terms}</p>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<Anchor type="button" on:click={decline} {loading}>Decline</Anchor>
|
<Anchor theme="button" on:click={decline} {loading}>Decline</Anchor>
|
||||||
<Anchor type="button-accent" on:click={accept} {loading}>Accept</Anchor>
|
<Anchor theme="button-accent" on:click={accept} {loading}>Accept</Anchor>
|
||||||
</div>
|
</div>
|
||||||
</Content>
|
</Content>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="my-8 flex justify-center">
|
<div class="my-8 flex justify-center">
|
||||||
<Anchor type="button-minimal" on:click={openModal}>
|
<Anchor theme="button-minimal" on:click={openModal}>
|
||||||
<i class="fa fa-plus" /> Show all {annotated.length} link previews
|
<i class="fa fa-plus" /> Show all {annotated.length} link previews
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
{#each actions as { label, icon, onClick }}
|
{#each actions as { label, icon, onClick }}
|
||||||
<div class="relative z-10 cursor-pointer text-gray-2" on:click={onClick}>
|
<div class="relative z-10 cursor-pointer text-gray-2" on:click={onClick}>
|
||||||
<span class="absolute right-0 mr-12 mt-2 whitespace-nowrap">{label}</span>
|
<span class="absolute right-0 mr-12 mt-2 whitespace-nowrap">{label}</span>
|
||||||
<Anchor type="button-circle"><i class={`fa fa-${icon}`} /></Anchor>
|
<Anchor theme="button-circle"><i class={`fa fa-${icon}`} /></Anchor>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user