Skip to content

Commit

Permalink
icon button should be a button
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcottle committed Nov 22, 2024
1 parent 3076019 commit fd7155c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/IconButton.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="cursor-pointer p-2 rounded-full hover:bg-gray-200">
<button type="button" class="p-2 rounded-full hover:bg-gray-200">
<slot/>
</div>
</button>
</template>

<script>
Expand Down
8 changes: 4 additions & 4 deletions src/components/nodes/NodeListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@
<!-- favourite icon for other nodes -->
<div v-if="node.num !== GlobalState.myNodeId" class="ml-2 my-auto">
<IconButton @click.stop="toggleFavouriteNode(node)" class="bg-transparent">
<div v-if="node.isFavorite" class="text-yellow-500">
<span v-if="node.isFavorite" class="text-yellow-500">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-6">
<path fill-rule="evenodd" d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z" clip-rule="evenodd" />
</svg>
</div>
<div v-else class="text-gray-500">
</span>
<span v-else class="text-gray-500">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z" />
</svg>
</div>
</span>
</IconButton>
</div>

Expand Down
2 changes: 0 additions & 2 deletions src/components/pages/NodeMessagesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,13 @@ import AppBar from "../AppBar.vue";
import MessageViewer from "../messages/MessageViewer.vue";
import NodeIcon from "../nodes/NodeIcon.vue";
import Page from "./Page.vue";
import IconButton from "../IconButton.vue";
import NodeUtils from "../../js/NodeUtils.js";
import NodeDropDownMenu from "../nodes/NodeDropDownMenu.vue";
export default {
name: 'NodeMessagesPage',
components: {
NodeDropDownMenu,
IconButton,
Page,
NodeIcon,
AppBar,
Expand Down

0 comments on commit fd7155c

Please sign in to comment.