Skip to content

Commit b836b7a

Browse files
committed
chore: update BaseButton size prop values
1 parent 5db5dc6 commit b836b7a

File tree

13 files changed

+19
-20
lines changed

13 files changed

+19
-20
lines changed

app/components/Button/Base.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const Secondary: Story = {
2424
export const Small: Story = {
2525
args: {
2626
default: 'Small Button',
27-
size: 'small',
27+
size: 'sm',
2828
variant: 'secondary',
2929
},
3030
}

app/components/Button/Base.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const props = withDefaults(
88
type?: 'button' | 'submit'
99
/** @default "secondary" */
1010
variant?: 'primary' | 'secondary'
11-
/** @default "medium" */
12-
size?: 'small' | 'medium'
11+
/** @default "md" */
12+
size?: 'sm' | 'md'
1313
/** Keyboard shortcut hint */
1414
ariaKeyshortcuts?: string
1515
/** Forces the button to occupy the entire width of its container. */
@@ -20,7 +20,7 @@ const props = withDefaults(
2020
{
2121
type: 'button',
2222
variant: 'secondary',
23-
size: 'medium',
23+
size: 'md',
2424
},
2525
)
2626
@@ -41,8 +41,8 @@ defineExpose({
4141
:class="{
4242
'inline-flex': !block,
4343
'flex': block,
44-
'text-sm px-4 py-2': size === 'medium',
45-
'text-xs px-2 py-0.5': size === 'small',
44+
'text-sm px-4 py-2': size === 'md',
45+
'text-xs px-2 py-0.5': size === 'sm',
4646
'bg-transparent text-fg hover:enabled:(bg-fg/10) focus-visible:enabled:(bg-fg/10) aria-pressed:(bg-fg/10 border-fg/20 hover:enabled:(bg-fg/20 text-fg/50))':
4747
variant === 'secondary',
4848
'text-bg bg-fg hover:enabled:(bg-fg/50) focus-visible:enabled:(bg-fg/50) aria-pressed:(bg-fg text-bg border-fg hover:enabled:(text-bg/50))':

app/components/Compare/FacetSelector.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function isCategoryNoneSelected(category: string): boolean {
4040
:aria-pressed="isCategoryAllSelected(category)"
4141
:disabled="isCategoryAllSelected(category)"
4242
@click="selectCategory(category)"
43-
size="small"
43+
size="sm"
4444
>
4545
{{ $t('compare.facets.all') }}
4646
</ButtonBase>
@@ -52,7 +52,7 @@ function isCategoryNoneSelected(category: string): boolean {
5252
:aria-pressed="isCategoryNoneSelected(category)"
5353
:disabled="isCategoryNoneSelected(category)"
5454
@click="deselectCategory(category)"
55-
size="small"
55+
size="sm"
5656
>
5757
{{ $t('compare.facets.none') }}
5858
</ButtonBase>
@@ -64,7 +64,7 @@ function isCategoryNoneSelected(category: string): boolean {
6464
<ButtonBase
6565
v-for="facet in facetsByCategory[category]"
6666
:key="facet.id"
67-
size="small"
67+
size="sm"
6868
:title="facet.comingSoon ? $t('compare.facets.coming_soon') : facet.description"
6969
:disabled="facet.comingSoon"
7070
:aria-pressed="isFacetSelected(facet.id)"

app/components/Compare/PackageSelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ onClickOutside(containerRef, () => {
213213
{{ pkg }}
214214
</LinkBase>
215215
<ButtonBase
216-
size="small"
216+
size="sm"
217217
:aria-label="
218218
$t('compare.selector.remove_package', {
219219
package: pkg === NO_DEPENDENCY_ID ? $t('compare.no_dependency.label') : pkg,

app/components/Compare/ReplacementSuggestion.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const docUrl = computed(() => {
6565
<!-- No dependency action button -->
6666
<ButtonBase
6767
v-if="variant === 'nodep' && showAction !== false"
68-
size="small"
68+
size="sm"
6969
:aria-label="$t('compare.no_dependency.add_column')"
7070
@click="emit('addNoDep')"
7171
>

app/components/Filter/Panel.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ const hasActiveFilters = computed(() => !!filterSummary.value)
328328
<ButtonBase
329329
v-for="keyword in displayedKeywords"
330330
:key="keyword"
331-
size="small"
331+
size="sm"
332332
:aria-pressed="filters.keywords.includes(keyword)"
333333
@click="emit('toggleKeyword', keyword)"
334334
>

app/components/Package/Card.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ const numberFormatter = useNumberFormatter()
169169
<li v-for="keyword in result.package.keywords.slice(0, 5)" :key="keyword">
170170
<ButtonBase
171171
class="pointer-events-auto"
172-
size="small"
172+
size="sm"
173173
:aria-pressed="props.filters?.keywords.includes(keyword)"
174174
:title="`Filter by ${keyword}`"
175175
@click.stop="emit('clickKeyword', keyword)"

app/components/Package/Header.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ const likeAction = async () => {
295295
>
296296
<ButtonBase
297297
@click="likeAction"
298-
size="medium"
299298
:aria-label="
300299
likesData?.userHasLiked ? $t('package.likes.unlike') : $t('package.likes.like')
301300
"

app/components/Package/TableRow.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const allMaintainersText = computed(() => {
133133
<ButtonBase
134134
v-for="keyword in pkg.keywords.slice(0, 3)"
135135
:key="keyword"
136-
size="small"
136+
size="sm"
137137
:aria-pressed="props.filters?.keywords.includes(keyword)"
138138
:title="`Filter by ${keyword}`"
139139
@click.stop="emit('clickKeyword', keyword)"

app/components/SearchProviderToggle.client.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ useEventListener('keydown', event => {
2828
:aria-label="$t('settings.data_source.label')"
2929
:aria-expanded="isOpen"
3030
aria-haspopup="true"
31-
size="small"
31+
size="sm"
3232
class="border-none w-8 h-8 !px-0 justify-center"
3333
classicon="i-lucide:settings"
3434
@click="isOpen = !isOpen"

0 commit comments

Comments
 (0)