Skip to content

Commit 4560253

Browse files
committed
chore: update BaseLink size prop values
1 parent b836b7a commit 4560253

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

app/components/Compare/ReplacementSuggestion.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const docUrl = computed(() => {
7373
</ButtonBase>
7474

7575
<!-- Info link -->
76-
<LinkBase v-else-if="docUrl" :to="docUrl" variant="button-secondary" size="small">
76+
<LinkBase v-else-if="docUrl" :to="docUrl" variant="button-secondary" size="sm">
7777
{{ $t('package.replacement.learn_more') }}
7878
</LinkBase>
7979
</div>

app/components/Link/Base.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const props = withDefaults(
1313
/** Visual style of the link */
1414
variant?: 'button-primary' | 'button-secondary' | 'link'
1515
/** Size (only applicable for button variants) */
16-
size?: 'small' | 'medium'
16+
size?: 'sm' | 'md'
1717
/** Makes the link take full width */
1818
block?: boolean
1919
@@ -48,7 +48,7 @@ const props = withDefaults(
4848
*/
4949
noNewTabIcon?: boolean
5050
}>(),
51-
{ variant: 'link', size: 'medium' },
51+
{ variant: 'link', size: 'md' },
5252
)
5353
5454
const isLinkExternal = computed(
@@ -64,8 +64,8 @@ const isLinkAnchor = computed(
6464
/** size is only applicable for button like links */
6565
const isLink = computed(() => props.variant === 'link')
6666
const isButton = computed(() => !isLink.value)
67-
const isButtonSmall = computed(() => props.size === 'small' && !isLink.value)
68-
const isButtonMedium = computed(() => props.size === 'medium' && !isLink.value)
67+
const isButtonSmall = computed(() => props.size === 'sm' && !isLink.value)
68+
const isButtonMedium = computed(() => props.size === 'md' && !isLink.value)
6969
const keyboardShortcutsEnabled = useKeyboardShortcuts()
7070
</script>
7171

app/components/Link/Link.stories.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const ButtonSecondary: Story = {
6666
export const SmallButton: Story = {
6767
args: {
6868
variant: 'button-primary',
69-
size: 'small',
69+
size: 'sm',
7070
default: 'Small Button',
7171
},
7272
}
@@ -113,14 +113,14 @@ export const Snapshot: Story = {
113113
<LinkBase to="/" classicon="i-lucide:check">Link with icon</LinkBase>
114114
<LinkBase to="/" no-underline>Link without underline</LinkBase>
115115
<LinkBase to="/" disabled>Disabled Link</LinkBase>
116-
116+
117117
<div style="display: flex; gap: 1rem; flex-wrap: wrap;">
118118
<LinkBase to="/" variant="button-primary">Primary</LinkBase>
119119
<LinkBase to="/" variant="button-secondary">Secondary</LinkBase>
120120
<LinkBase to="/" variant="button-primary" disabled>Disabled</LinkBase>
121121
<LinkBase to="/" variant="button-primary" classicon="i-lucide:copy">With Icon</LinkBase>
122122
</div>
123-
123+
124124
<div style="display: flex; gap: 1rem;">
125125
<LinkBase to="/" variant="button-primary" size="small">Small Button</LinkBase>
126126
</div>

app/components/Package/Keywords.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const { model } = useGlobalSearch()
1111
<li v-for="keyword in keywords.slice(0, 15)" :key="keyword">
1212
<LinkBase
1313
variant="button-secondary"
14-
size="small"
14+
size="sm"
1515
:to="{ name: 'search', query: { q: `keyword:${keyword}` } }"
1616
@click="model = `keyword:${keyword}`"
1717
>

app/components/Package/MetricsBadges.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const typesHref = computed(() => {
6161
<LinkBase
6262
v-if="typesHref"
6363
variant="button-secondary"
64-
size="small"
64+
size="sm"
6565
:to="typesHref"
6666
classicon="i-lucide:check"
6767
>

app/pages/package/[[org]]/[name].vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ const showSkeleton = shallowRef(false)
713713
<ButtonGroup v-if="dependencyCount > 0" class="ms-auto">
714714
<LinkBase
715715
variant="button-secondary"
716-
size="small"
716+
size="sm"
717717
:to="`https://npmgraph.js.org/?q=${pkg.name}${resolvedVersion ? `@${resolvedVersion}` : ''}`"
718718
:title="$t('package.stats.view_dependency_graph')"
719719
classicon="i-lucide:network -rotate-90"
@@ -723,7 +723,7 @@ const showSkeleton = shallowRef(false)
723723

724724
<LinkBase
725725
variant="button-secondary"
726-
size="small"
726+
size="sm"
727727
:to="`https://node-modules.dev/grid/depth#install=${pkg.name}${resolvedVersion ? `@${resolvedVersion}` : ''}`"
728728
:title="$t('package.stats.inspect_dependency_tree')"
729729
classicon="i-lucide:table"

test/nuxt/a11y.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ describe('component accessibility audits', () => {
550550
to: 'http://example.com',
551551
disabled: true,
552552
variant: 'button-secondary',
553-
size: 'small',
553+
size: 'sm',
554554
},
555555
slots: { default: 'Button link content' },
556556
})

0 commit comments

Comments
 (0)