switch to mono-svelte Button component
This commit is contained in:
1 parent
c4a1f143cb
commit
d02d8556d5
61 files changed
+298
-348
No files matched your search
@@ -1,6 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { profile, profileData, setUserID } from '$lib/auth.js'
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
import Link from '$lib/components/input/Link.svelte'
|
||||
import ShieldIcon from '$lib/components/lemmy/moderation/ShieldIcon.svelte'
|
||||
import {
|
||||
@@ -15,6 +14,7 @@
|
||||
import { LINKED_INSTANCE_URL, instance } from '$lib/instance.js'
|
||||
import { site } from '$lib/lemmy.js'
|
||||
import { theme } from '$lib/ui/colors.js'
|
||||
import { Button } from 'mono-svelte'
|
||||
import {
|
||||
ArrowLeftOnRectangle,
|
||||
Bars3,
|
||||
@@ -97,7 +97,7 @@
|
||||
dark:text-zinc-300 text-slate-700 hover:text-inherit hover:dark:text-inherit
|
||||
hover:bg-slate-200 relative hover:border-slate-300"
|
||||
>
|
||||
<Icon src={CommandLine} mini size="16" slot="icon" />
|
||||
<Icon src={CommandLine} mini size="16" slot="prefix" />
|
||||
<span class="hidden md:inline">Admin</span>
|
||||
</Button>
|
||||
{/if}
|
||||
@@ -123,7 +123,7 @@
|
||||
class="max-md:w-9 max-md:h-8 max-md:!p-0
|
||||
dark:text-zinc-300 text-slate-700 hover:text-inherit hover:dark:text-inherit hover:bg-slate-200 hover:border-slate-300"
|
||||
>
|
||||
<Icon mini src={MagnifyingGlass} width={16} slot="icon" />
|
||||
<Icon mini src={MagnifyingGlass} width={16} slot="prefix" />
|
||||
<span class="hidden md:inline">Search</span>
|
||||
</Button>
|
||||
<Button
|
||||
@@ -133,18 +133,19 @@
|
||||
dark:text-zinc-300 text-slate-700 hover:text-inherit
|
||||
hover:dark:text-inherit hover:bg-slate-200 hover:border-slate-300"
|
||||
>
|
||||
<Icon mini src={GlobeAlt} size="16" slot="icon" />
|
||||
<Icon mini src={GlobeAlt} size="16" slot="prefix" />
|
||||
<span class="hidden md:inline">Explore</span>
|
||||
</Button>
|
||||
<Menu let:toggleOpen alignment="bottom-right">
|
||||
<Menu alignment="bottom-right">
|
||||
<Button
|
||||
let:toggleOpen
|
||||
color="primary"
|
||||
slot="button"
|
||||
aria-label="Create"
|
||||
on:click={toggleOpen}
|
||||
class="max-md:w-9 max-md:h-8 max-md:!p-0"
|
||||
>
|
||||
<Icon src={Plus} width={18} mini slot="icon" />
|
||||
<Icon src={Plus} width={18} mini slot="prefix" />
|
||||
<span class="hidden md:inline">Create</span>
|
||||
</Button>
|
||||
<li class="text-xs opacity-80 text-left mx-4 my-1 py-1">Create</li>
|
||||
@@ -175,7 +176,6 @@
|
||||
</Menu>
|
||||
</div>
|
||||
<Menu
|
||||
let:toggleOpen
|
||||
alignment="bottom-right"
|
||||
itemsClass="h-8 md:h-8"
|
||||
containerClass="!max-h-[28rem]"
|
||||
@@ -185,6 +185,7 @@
|
||||
dark:bg-zinc-800 relative"
|
||||
aria-label="Profile"
|
||||
slot="button"
|
||||
let:toggleOpen
|
||||
on:click={toggleOpen}
|
||||
>
|
||||
{#if $profile?.user}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
|
||||
export let page: number
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
const buttonColors = {
|
||||
secondary:
|
||||
'hover:bg-neutral-200/50 hover:dark:bg-zinc-600/20 text-slate-800 fill-slate-800 dark:text-zinc-200 dark:fill-zinc-200',
|
||||
'hover:bg-gray-200/50 hover:dark:bg-zinc-600/20 text-slate-800 fill-slate-800 dark:text-zinc-200 dark:fill-zinc-200',
|
||||
dangerSecondary: 'hover:bg-red-500 text-red-500 hover:text-white',
|
||||
success:
|
||||
'hover:bg-green-600 text-green-600 dark:text-green-500 hover:text-white hover:dark:text-white',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
import Card from '$lib/components/ui/Card.svelte'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { Icon, XMark } from 'svelte-hero-icons'
|
||||
import { expoOut } from 'svelte/easing'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||
import type { Community } from 'lemmy-js-client'
|
||||
import { Button } from 'mono-svelte'
|
||||
import { flip } from 'svelte/animate'
|
||||
import { expoOut } from 'svelte/easing'
|
||||
import { slide } from 'svelte/transition'
|
||||
@@ -27,7 +27,7 @@
|
||||
alt={follow.name}
|
||||
title={follow.title}
|
||||
width={20}
|
||||
slot="icon"
|
||||
slot="prefix"
|
||||
/>
|
||||
</div>
|
||||
<span class="max-w-full break-words" class:hidden={!expanded}>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/stores'
|
||||
import { profile, setUserID, type Profile } from '$lib/auth.js'
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
import ProfileAvatar from '$lib/lemmy/ProfileAvatar.svelte'
|
||||
import { Button } from 'mono-svelte'
|
||||
|
||||
export let expanded: boolean = false
|
||||
export let prof: Profile
|
||||
@@ -41,7 +41,7 @@
|
||||
profile={prof}
|
||||
{index}
|
||||
selected={$profile?.id == prof.id}
|
||||
slot="icon"
|
||||
slot="prefix"
|
||||
/>
|
||||
<span class:hidden={!expanded} class="flex flex-col gap-0">
|
||||
{prof.username ?? prof.user?.local_user_view.person.name}
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
Icon,
|
||||
UserGroup,
|
||||
} from 'svelte-hero-icons'
|
||||
import Button from '../../input/Button.svelte'
|
||||
import { profile, profileData } from '$lib/auth.js'
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import SidebarButton from '$lib/components/ui/sidebar/SidebarButton.svelte'
|
||||
@@ -16,6 +15,7 @@
|
||||
import ProfileButton from '$lib/components/ui/sidebar/ProfileButton.svelte'
|
||||
import { flip } from 'svelte/animate'
|
||||
import { expoOut } from 'svelte/easing'
|
||||
import { Button } from 'mono-svelte'
|
||||
</script>
|
||||
|
||||
<nav
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
import { Button } from 'mono-svelte'
|
||||
|
||||
export let expanded: boolean
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
import Spinner from '$lib/components/ui/loader/Spinner.svelte'
|
||||
import {
|
||||
type Toast,
|
||||
|
||||
Reference in new issue
Block a user