Skip to content

Commit 2a99783

Browse files
committed
refactor: move shortcut directly onto component
1 parent 2fb44eb commit 2a99783

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

app/components/Tag/Clickable.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ const props = withDefaults(defineProps<{ as?: string | Component }>(),{ as: 'but
33
</script>
44

55
<template>
6-
<component :is="props.as" class="tag">
6+
<component
7+
:is="props.as"
8+
class="inline-flex items-center px-2 py-0.5 text-xs font-mono text-fg-muted bg-bg-muted border border-border rounded transition-colors duration-200 hover:(text-fg border-border-hover)"
9+
>
710
<slot />
811
</component>
912
</template>

app/components/Tag/Static.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ const props = withDefaults(defineProps<{ as?: string | Component }>(),{ as: 'spa
33
</script>
44

55
<template>
6-
<component :is="props.as" class="tag">
6+
<component
7+
:is="props.as"
8+
class="inline-flex items-center px-2 py-0.5 text-xs font-mono text-fg-muted bg-bg-muted border border-border rounded transition-colors duration-200 hover:(text-fg border-border-hover)"
9+
>
710
<slot />
811
</component>
912
</template>

uno.config.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,7 @@ export default defineConfig({
142142
],
143143
['link-subtle', 'text-fg-muted hover:text-fg transition-colors duration-200 focus-ring'],
144144

145-
// Tags/badges
146-
[
147-
'tag',
148-
'inline-flex items-center px-2 py-0.5 text-xs font-mono text-fg-muted bg-bg-muted border border-border rounded transition-colors duration-200 hover:(text-fg border-border-hover)',
149-
],
145+
// badges
150146
['badge-orange', 'bg-badge-orange/10 text-badge-orange'],
151147
['badge-yellow', 'bg-badge-yellow/10 text-badge-yellow'],
152148
['badge-green', 'bg-badge-green/10 text-badge-green'],

0 commit comments

Comments
 (0)