Skip to content

Commit b323b78

Browse files
committed
fix: replace new button
1 parent 4ceb40e commit b323b78

2 files changed

Lines changed: 7 additions & 15 deletions

File tree

app/components/Button/Base.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ defineExpose({
3131
<template>
3232
<button
3333
ref="el"
34-
class="group cursor-pointer inline-flex 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) aria-pressed:(bg-fg text-bg border-fg hover:enabled:(text-bg/50))"
34+
class="group cursor-pointer inline-flex 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)"
3535
:class="{
3636
'text-sm px-4 py-2': size === 'medium',
3737
'text-xs px-2 py-0.5': size === 'small',
38-
'bg-transparent text-fg hover:enabled:(bg-fg/10) focus-visible:enabled:(bg-fg/10)':
38+
'bg-transparent text-fg hover:enabled:(bg-fg/10) focus-visible:enabled:(bg-fg/10) aria-pressed:(bg-fg text-bg border-fg hover:enabled:(bg-fg text-bg/50))':
3939
variant === 'secondary',
40-
'text-bg bg-fg hover:enabled:(bg-fg/50) focus-visible:enabled:(bg-fg/50)':
40+
'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))':
4141
variant === 'primary',
4242
}"
4343
:type="props.type"

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,24 +1077,16 @@ onKeyStroke(
10771077
:text="$t('package.readme.copy_as_markdown')"
10781078
position="bottom"
10791079
>
1080-
<button
1081-
type="button"
1080+
<ButtonBase
10821081
@click="copyReadme()"
1083-
class="px-2 py-1.5 font-mono text-xs rounded transition-colors duration-150 inline-flex items-center gap-1.5"
1084-
:class="
1085-
copiedReadme ? 'text-accent bg-accent/10' : 'text-fg-subtle bg-bg hover:text-fg'
1086-
"
1082+
:aria-pressed="copiedReadme"
10871083
:aria-label="
10881084
copiedReadme ? $t('common.copied') : $t('package.readme.copy_as_markdown')
10891085
"
1086+
:classicon="copiedReadme ? 'i-carbon:checkmark' : 'i-simple-icons:markdown'"
10901087
>
1091-
<span
1092-
:class="copiedReadme ? 'i-carbon:checkmark' : 'i-simple-icons:markdown'"
1093-
class="size-3"
1094-
aria-hidden="true"
1095-
/>
10961088
{{ copiedReadme ? $t('common.copied') : $t('common.copy') }}
1097-
</button>
1089+
</ButtonBase>
10981090
</TooltipApp>
10991091
<ReadmeTocDropdown
11001092
v-if="readmeData?.toc && readmeData.toc.length > 1"

0 commit comments

Comments
 (0)