Skip to content

Commit bda290f

Browse files
authored
feat: set cursor-pointer on buttons (#2752)
1 parent b539c51 commit bda290f

8 files changed

Lines changed: 17 additions & 4 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ The command palette is a first-class navigation surface. When you add a new user
452452

453453
### Cursor and navigation
454454

455-
**npmx** uses `cursor: pointer` only for links to match users’ everyday experience. For all other interactive elements, including buttons, use the default cursor (_or another appropriate cursor to indicate state_).
455+
**npmx** uses `cursor: pointer` for links and buttons to match users’ everyday experience. For all other interactive elements, use the default cursor (_or another appropriate cursor to indicate state_).
456456

457457
> [!NOTE]
458458
> A link is any element that leads to another content (_go to another page, authorize_)

app/components/Button/Base.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ defineExpose({
4444
<template>
4545
<button
4646
ref="el"
47-
class="group gap-x-1 items-center justify-center font-mono border border-border rounded-md transition-all duration-200 disabled:(opacity-40 cursor-not-allowed border-transparent)"
47+
class="group gap-x-1 items-center justify-center font-mono border border-border rounded-md transition-all duration-200 cursor-pointer disabled:(opacity-40 cursor-not-allowed border-transparent)"
4848
:class="{
4949
'inline-flex': !block,
5050
'flex': block,

app/components/Compare/FacetBarChart.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ const config = computed<VueUiHorizontalBarConfig>(() => {
152152
})
153153
},
154154
},
155+
useCursorPointer: true,
155156
},
156157
skeletonDataset: skeletonDataset.value,
157158
skeletonConfig: {

app/components/Compare/FacetScatterChart.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ const config = computed<VueUiScatterConfig>(() => {
166166
})
167167
},
168168
},
169+
useCursorPointer: true,
169170
},
170171
style: {
171172
backgroundColor: colors.value.bg,

app/components/InstantSearch.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ onPrehydrate(el => {
2929
<strong>{{ $t('search.instant_search_on') }}</strong>
3030
</template>
3131
<template #action>
32-
<button type="button" class="underline" @click="settings.instantSearch = false">
32+
<button
33+
type="button"
34+
class="underline cursor-pointer"
35+
@click="settings.instantSearch = false"
36+
>
3337
{{ $t('search.instant_search_turn_off') }}
3438
</button>
3539
</template>
@@ -44,7 +48,11 @@ onPrehydrate(el => {
4448
<strong>{{ $t('search.instant_search_off') }}</strong>
4549
</template>
4650
<template #action>
47-
<button type="button" class="underline" @click="settings.instantSearch = true">
51+
<button
52+
type="button"
53+
class="underline cursor-pointer"
54+
@click="settings.instantSearch = true"
55+
>
4856
{{ $t('search.instant_search_turn_on') }}
4957
</button>
5058
</template>

app/components/Package/TimelineChart.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ const config = computed<VueUiXyConfig>(() => {
411411
},
412412
}),
413413
},
414+
useCursorPointer: true,
414415
},
415416
zoom: {
416417
show: settings.value.timelineChart.showZoom,

app/components/Package/TrendsChart.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,6 +1460,7 @@ const chartConfig = computed<VueUiXyConfig>(() => {
14601460
},
14611461
}),
14621462
},
1463+
useCursorPointer: true,
14631464
},
14641465
grid: {
14651466
position: 'start',

app/components/Package/VersionDistribution.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ const chartConfig = computed<VueUiXyConfig>(() => {
238238
},
239239
}),
240240
},
241+
useCursorPointer: true,
241242
},
242243
grid: {
243244
stroke: colors.value.border,

0 commit comments

Comments
 (0)