Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
7944d18
component: Initial shadcn button commit
DrJKL Dec 15, 2025
d9bde9b
style: Align variants with Figma designs (excluding outlined)
DrJKL Dec 15, 2025
67e446d
component: Stories (mostly copied from TextButton)
DrJKL Dec 15, 2025
5ea477d
component: First migration to standard Button
DrJKL Dec 15, 2025
9eecc11
component: Second use of TextButton replaced with Button (also texton…
DrJKL Dec 16, 2025
2ba7774
component: Migrate clear button in multiselect.
DrJKL Dec 16, 2025
f5f9970
component: Migrating more TextButtons
DrJKL Dec 16, 2025
0931aa7
component: migrate Job Filters Tab buttons
DrJKL Dec 16, 2025
c1fdaea
component: Remaining TextButton instances
DrJKL Dec 16, 2025
e7b85f5
cleanup: Delete TextButton
DrJKL Dec 16, 2025
517fade
fix: Still need to figure out why the body font doesn't apply sometimes.
DrJKL Dec 16, 2025
6b7d6ea
Feat: Combinatoric Story
DrJKL Dec 16, 2025
c83b61c
feat: Use the variants/sizes in generating the story, add a Single Bu…
DrJKL Dec 16, 2025
816b693
cleanup: Simplify button options, add two text only variants
DrJKL Dec 16, 2025
9772832
component: Update what used to be subtype
DrJKL Dec 16, 2025
472ca5b
Storybook: Static size with a maintenance comment
DrJKL Dec 16, 2025
49b17d2
fix: Update subtype props
DrJKL Dec 16, 2025
e88c84d
[automated] Apply ESLint and Prettier fixes
actions-user Dec 16, 2025
82de3b6
Even better: Didn't need that button.
DrJKL Dec 17, 2025
2b2e32a
Fix: Make sure storybook works by disabling vue devtools
DrJKL Dec 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup: Simplify button options, add two text only variants
  • Loading branch information
DrJKL committed Dec 17, 2025
commit 816b693e67a7cf251286afaefbe85c16e87ee925
1 change: 0 additions & 1 deletion src/components/input/MultiSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
</span>
<Button
v-if="showClearButton"
variant="unset"
subtype="textonly"
size="md"
@click.stop="selectedItems = []"
Expand Down
3 changes: 1 addition & 2 deletions src/components/queue/job/QueueJobItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@
<Button
v-else-if="props.state === 'completed'"
class="transform bg-modal-card-button-surface px-2 py-0 transition duration-150 ease-in-out hover:-translate-y-px hover:opacity-95"
variant="unset"
subtype="textonly"
variant="textonly"
size="sm"
@click.stop="emit('view')"
>{{ t('menuLabels.View') }}</Button
Expand Down
3 changes: 1 addition & 2 deletions src/components/ui/button/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { buttonVariants } from './button.variants'
interface Props extends PrimitiveProps {
variant?: ButtonVariants['variant']
size?: ButtonVariants['size']
subtype?: ButtonVariants['subtype']
class?: HTMLAttributes['class']
}

Expand All @@ -22,7 +21,7 @@ const { as = 'button', class: customClass = '' } = defineProps<Props>()
<Primitive
:as
:as-child
:class="cn(buttonVariants({ variant, size, subtype }), customClass)"
:class="cn(buttonVariants({ variant, size }), customClass)"
>
<slot />
</Primitive>
Expand Down
55 changes: 9 additions & 46 deletions src/components/ui/button/button.variants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const buttonVariants = cva({
base: 'inline-flex items-center justify-center gap-2 cursor-pointer whitespace-nowrap appearance-none border-none rounded-md text-sm font-medium font-inter transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
variants: {
variant: {
unset: 'text-base-foreground hover:bg-secondary-background-hover',
secondary:
'bg-secondary-background text-secondary-foreground hover:bg-secondary-background-hover',
primary:
Expand All @@ -14,70 +13,34 @@ export const buttonVariants = cva({
'bg-base-foreground text-base-background hover:bg-base-foreground/80',
destructive:
'bg-destructive-background text-base-foreground hover:bg-destructive-background-hover',
'destructive-subtle':
'bg-secondary-background text-base-foreground hover:bg-destructive-background-hover'
textonly:
'text-base-foreground bg-transparent hover:bg-secondary-background-hover',
'muted-textonly':
'text-muted-foreground bg-transparent hover:bg-secondary-background-hover'
},
size: {
sm: 'h-6 rounded-sm px-2 py-1 text-xs',
md: 'h-8 rounded-lg p-2 text-xs',
lg: 'h-10 rounded-lg px-4 py-2 text-sm',
icon: 'size-9'
},
subtype: {
unset: null,
textonly: null
}
},
compoundVariants: [
{
variant: [
'unset',
'primary',
'secondary',
'inverted',
'destructive',
'destructive-subtle'
],
subtype: 'textonly',
class: 'bg-transparent'
},
{
variant: 'primary',
subtype: 'textonly',
class: 'text-primary-background'
},
{
variant: 'secondary',
subtype: 'textonly',
class: 'text-muted-foreground'
},
{
variant: 'destructive',
subtype: 'textonly',
class: 'text-destructive-background'
},
{
variant: 'destructive-subtle',
subtype: 'textonly',
class: 'text-secondary-background hover:text-destructive-background'
}
],

defaultVariants: {
variant: 'secondary',
size: 'md',
subtype: 'unset'
size: 'md'
}
})

export type ButtonVariants = VariantProps<typeof buttonVariants>

const variants = [
'unset',
'primary',
'secondary',
'primary',
'inverted',
'destructive',
'destructive-subtle'
'textonly',
'muted-textonly'
] as const satisfies Array<ButtonVariants['variant']>
const sizes = ['sm', 'md', 'lg', 'icon'] as const satisfies Array<
ButtonVariants['size']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<i class="icon-[lucide--external-link]" />
<span>{{ $t('g.learnMore') }}</span>
</a>
<Button variant="unset" subtype="textonly" @click="emit('close')">{{
<Button variant="textonly" @click="emit('close')">{{
$t('g.close')
}}</Button>
<Button variant="secondary" @click="emit('subscribe')">
Expand Down