switch to mono-svelte Button component

This commit is contained in:
Xyphyn committed 2023-09-03 17:05:45 -07:00
1 parent c4a1f143cb
commit d02d8556d5
61 files changed
+298 -348

No files matched your search

@@ -19,7 +19,7 @@
import { toast } from '$lib/components/ui/toasts/toasts.js'
import { profile } from '$lib/auth.js'
import { slide } from 'svelte/transition'
import Button from '$lib/components/input/Button.svelte'
import { Button } from 'mono-svelte'
export let node: CommentNodeI
export let postId: number
@@ -21,7 +21,6 @@
import { toast } from '$lib/components/ui/toasts/toasts.js'
import Menu from '$lib/components/ui/menu/Menu.svelte'
import MenuButton from '$lib/components/ui/menu/MenuButton.svelte'
import Button from '$lib/components/input/Button.svelte'
import { createEventDispatcher } from 'svelte'
import { isCommentMutable } from '$lib/components/lemmy/post/helpers.js'
import {
@@ -33,6 +32,7 @@
import CommentModerationMenu from '$lib/components/lemmy/moderation/CommentModerationMenu.svelte'
import { profile } from '$lib/auth.js'
import { deleteItem, save } from '$lib/lemmy/contentview.js'
import { Button } from 'mono-svelte'
export let comment: CommentView
export let replying: boolean = false
@@ -58,15 +58,22 @@
{#if $profile?.user && (amMod($profile?.user, comment.community) || isAdmin($profile.user))}
<CommentModerationMenu bind:item={comment} />
{/if}
<Menu let:toggleOpen class="top-0 leading-3" alignment="bottom-center">
<Menu class="top-0 leading-3" alignment="bottom-center">
<Button
let:toggleOpen
slot="button"
on:click={toggleOpen}
class="!p-1"
aria-label="Comment actions"
color="ghost"
>
<Icon src={EllipsisHorizontal} width={16} height={16} mini slot="icon" />
<Icon
src={EllipsisHorizontal}
width={16}
height={16}
mini
slot="prefix"
/>
</Button>
<span class="text-xs opacity-80 py-1 my-1 px-4">Comment actions</span>
<MenuButton
@@ -1,5 +1,4 @@
<script lang="ts">
import Button from '$lib/components/input/Button.svelte'
import { Color } from '$lib/ui/colors.js'
import type { CommentResponse } from 'lemmy-js-client'
import { getClient } from '$lib/lemmy.js'
@@ -11,6 +10,7 @@
import { toast } from '$lib/components/ui/toasts/toasts.js'
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
import { placeholders } from '$lib/util.js'
import { Button } from 'mono-svelte'
export let postId: number
export let parentId: number | undefined = undefined
@@ -1,10 +1,10 @@
<script lang="ts">
import Button from '$lib/components/input/Button.svelte'
import Comment from '$lib/components/lemmy/comment/Comment.svelte'
import PostMeta from '$lib/components/lemmy/post/PostMeta.svelte'
import Card from '$lib/components/ui/Card.svelte'
import { getInstance } from '$lib/lemmy.js'
import type { CommentView } from 'lemmy-js-client'
import { Button } from 'mono-svelte'
export let comment: CommentView
</script>
@@ -10,8 +10,8 @@
import { getClient } from '$lib/lemmy'
import { userSettings } from '$lib/settings'
import { profile } from '$lib/auth.js'
import Button from '$lib/components/input/Button.svelte'
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
import { Button } from 'mono-svelte'
export let vote: number = 0
export let score: number
@@ -3,13 +3,13 @@
import { buildCommentsTree, type CommentNodeI } from './comments'
import { page } from '$app/stores'
import { onMount, setContext } from 'svelte'
import Button from '$lib/components/input/Button.svelte'
import { ChevronDown, Icon, Plus, PlusCircle } from 'svelte-hero-icons'
import { getClient } from '$lib/lemmy.js'
import type { CommentView, Post } from 'lemmy-js-client'
import { fly } from 'svelte/transition'
import { toast } from '$lib/components/ui/toasts/toasts.js'
import { profile } from '$lib/auth.js'
import { Button } from 'mono-svelte'
export let nodes: CommentNodeI[]
export let isParent: boolean
@@ -131,7 +131,7 @@
fetchChildren(node).then(() => (node.loading = false))
}}
>
<Icon src={Plus} width={18} mini slot="icon" />
<Icon src={Plus} width={18} mini slot="prefix" />
{node.comment_view.counts.child_count} more
</Button>
</button>