From d36a8f95b8a42d10b43fbfa30749df56cdaa5ddd Mon Sep 17 00:00:00 2001 From: Vordgi Date: Sun, 8 Feb 2026 21:49:28 +0000 Subject: [PATCH] fix: restore rows truncates in package page --- app/components/Link/Base.vue | 17 ++++++++++++----- app/components/Package/Dependencies.vue | 17 +++++++++++------ app/components/Package/Versions.vue | 17 +++++++++++------ 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/app/components/Link/Base.vue b/app/components/Link/Base.vue index 52d474d5d..7651819b8 100644 --- a/app/components/Link/Base.vue +++ b/app/components/Link/Base.vue @@ -12,6 +12,7 @@ const props = withDefaults( 'type'?: never 'variant'?: 'button-primary' | 'button-secondary' | 'link' 'size'?: 'small' | 'medium' + 'iconSize'?: 'sm' | 'md' | 'lg' 'keyshortcut'?: string @@ -51,11 +52,21 @@ const isLinkAnchor = computed( () => !!props.to && typeof props.to === 'string' && props.to.startsWith('#'), ) +const ICON_SIZE_MAP = { + sm: 'size-3 min-w-3', + md: 'size-4 min-w-4', + lg: 'size-5 min-w-5', +} + /** size is only applicable for button like links */ const isLink = computed(() => props.variant === 'link') const isButton = computed(() => props.variant !== 'link') const isButtonSmall = computed(() => props.size === 'small' && props.variant !== 'link') const isButtonMedium = computed(() => props.size === 'medium' && props.variant !== 'link') + +const iconSizeClass = computed( + () => ICON_SIZE_MAP[props.iconSize || (isButtonSmall.value && 'sm') || 'md'], +)