Skip to content

Commit c380d82

Browse files
committed
refactor(repo-item): move drag-handle styles to global scope
1 parent 5892c31 commit c380d82

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/assets/global.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,3 +311,9 @@ dialog {
311311
.capitalize {
312312
text-transform: capitalize;
313313
}
314+
.drag-handle {
315+
cursor: grab;
316+
&:hover {
317+
color: var(--accent);
318+
}
319+
}

src/components/repo-item.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
>
2525
<icon-trash />
2626
</button>
27-
<icon-grip-vertical class="repo__header-actions-handler" />
27+
<icon-grip-vertical class="drag-handle" />
2828
</div>
2929
</header>
3030
<ul class="repo__body">
@@ -214,12 +214,6 @@ const {
214214
.repo:focus-within & {
215215
display: flex;
216216
}
217-
&-handler {
218-
cursor: grab;
219-
&:hover {
220-
color: var(--accent);
221-
}
222-
}
223217
}
224218
}
225219
&__body {

src/pages/repositories.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const filteredItems = computed(() => {
5959
});
6060
6161
const reposRef = useTemplateRef("reposElement");
62-
useSortable(reposRef, repositories, { handle: ".repo__header-actions-handler" });
62+
useSortable(reposRef, repositories, { handle: ".drag-handle" });
6363
6464
type SortOption = "alphabetic" | "stars" | "forks" | "issues" | "update" | "language";
6565
function sort(option: SortOption): void {

0 commit comments

Comments
 (0)