Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
58 changes: 31 additions & 27 deletions packages/component-library/src/components/button/Button.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
justify-content: center;
gap: 8px;
border: none;
border-radius: 8px;
border-radius: 6px;
font-weight: 500;
font-family: sans-serif;
cursor: pointer;
Expand All @@ -27,8 +27,8 @@
}

.button--medium {
padding: 10px 20px;
font-size: 1em;
padding: 8px 16px;
font-size: 0.875em;
gap: 8px;
}

Expand All @@ -40,64 +40,68 @@

/* Variant modifiers */
.button--primary {
background-color: rgb(14, 103, 255);
background-color: rgb(23, 23, 23);
color: white;
}

.button--primary:hover:not(.button--disabled) {
background-color: rgb(10, 78, 194);
background-color: rgb(18, 18, 18);
}

.button--primary:active:not(.button--disabled) {
background-color: rgb(8, 62, 155);
background-color: rgb(15, 15, 15);
}

.button--primary.button--disabled {
background-color: rgb(84, 146, 253);
background-color: rgb(60, 60, 60);
cursor: not-allowed;
opacity: 0.6;
}

.button--secondary {
background: transparent;
border: 1px solid rgb(14, 103, 255);
color: rgb(14, 103, 255);
background-color: rgb(229, 229, 229);
color: rgb(0, 0, 0);
border: none;
}

.button--secondary:hover:not(.button--disabled) {
background-color: rgba(14, 103, 255, 0.1);
border-color: rgb(10, 78, 194);
color: rgb(10, 78, 194);
background-color: rgb(212, 212, 212);
color: rgb(0, 0, 0);
}

.button--secondary:active:not(.button--disabled) {
background-color: rgba(14, 103, 255, 0.2);
border-color: rgb(8, 62, 155);
color: rgb(8, 62, 155);
background-color: rgb(196, 196, 196);
color: rgb(0, 0, 0);
}

.button--secondary.button--disabled {
border-color: rgb(84, 146, 253);
color: rgb(84, 146, 253);
background-color: rgb(243, 243, 243);
color: rgb(0, 0, 0);
cursor: not-allowed;
opacity: 0.6;
}

.button--critical {
background-color: rgb(220, 38, 38);
color: white;
.button--outline {
background: transparent;
border: 1px solid rgb(229, 229, 229);
color: rgb(0, 0, 0);
}

.button--critical:hover:not(.button--disabled) {
background-color: rgb(185, 28, 28);
.button--outline:hover:not(.button--disabled) {
background-color: rgba(229, 229, 229, 0.1);
border-color: rgb(212, 212, 212);
color: rgb(0, 0, 0);
}

.button--critical:active:not(.button--disabled) {
background-color: rgb(153, 27, 27);
.button--outline:active:not(.button--disabled) {
background-color: rgba(229, 229, 229, 0.2);
border-color: rgb(196, 196, 196);
color: rgb(0, 0, 0);
}

.button--critical.button--disabled {
background-color: rgb(239, 68, 68);
.button--outline.button--disabled {
border-color: rgb(243, 243, 243);
color: rgb(0, 0, 0);
cursor: not-allowed;
opacity: 0.6;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const meta: Meta<typeof Button> = {
component: Button,
argTypes: {
variant: {
options: ['primary', 'secondary', 'critical'],
options: ['primary', 'secondary', 'outline'],
control: {
type: 'select'
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ButtonHTMLAttributes, ReactNode, MouseEvent } from 'react';

export type ButtonVariant = 'primary' | 'secondary' | 'critical';
export type ButtonVariant = 'primary' | 'secondary' | 'outline';

Copilot AI Jan 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README.md still references the old 'critical' variant in the example code and props table. These should be updated to reflect the new 'outline' variant to keep the documentation consistent with the code changes.

Copilot uses AI. Check for mistakes.

Copilot AI Jan 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new 'outline' variant lacks test coverage. Consider adding tests to verify that the 'outline' variant renders correctly with the appropriate CSS classes, similar to how 'primary' and 'secondary' variants should be tested.

Copilot uses AI. Check for mistakes.

Copilot AI Jan 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change that removes the 'critical' variant and replaces it with 'outline'. A changeset file should be created to document this breaking change for version management and release notes. Run 'npx changeset' to create a changeset describing this breaking change.

Copilot uses AI. Check for mistakes.
export type ButtonSize = 'small' | 'medium' | 'large';

export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'> {
Expand Down
Loading