Skip to content

feat: align mdk button styles with moria#13

Merged
boris91 merged 5 commits intotetherto:stagingfrom
robdll:feat/btn-component
Feb 6, 2026
Merged

feat: align mdk button styles with moria#13
boris91 merged 5 commits intotetherto:stagingfrom
robdll:feat/btn-component

Conversation

@robdll
Copy link

@robdll robdll commented Feb 5, 2026

Update core button API and styles to match moria specs, and refresh demo layout to show normal, disabled, and hover states in a 4x3 grid.

Screenshot 2026-02-05 at 10 16 37 AM

Update core button API and styles to match moria specs, and refresh demo layout to show normal, disabled, and hover states in a 4x3 grid.
eugeneglova
eugeneglova previously approved these changes Feb 5, 2026
arif-dewi
arif-dewi previously approved these changes Feb 5, 2026
},
ref,
) => {
const resolvedVariant = variant ?? (danger ? 'danger' : (color ?? 'secondary'))
Copy link

@eskawl eskawl Feb 5, 2026

Choose a reason for hiding this comment

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

What happens in this case?

<Button variant="primary" danger color="ghost" />

Is this an acceptable use of a button? I feel we should design around having minimal overlap between props and avoid boolean props in the overlap as much as possible.

Copy link
Author

Choose a reason for hiding this comment

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

updated to prefer a single source of truth: removed danger/color in favor of variant.

color?: ButtonColor
} & React.ButtonHTMLAttributes<HTMLButtonElement>

function sizeToSize(size?: string): ButtonSize {
Copy link

@habrahamyanbf habrahamyanbf Feb 5, 2026

Choose a reason for hiding this comment

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

What do you think about using ES6+ features and creating a sizeMap here instead?

Copy link
Author

Choose a reason for hiding this comment

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

Refactored sizeToSize to use a sizeMap and added a safe fallback to md.

Comment on lines 42 to 46
--mdk-button-radius: 0px;
--mdk-button-font-size: 14px;
--mdk-button-line-height: 22px;
--mdk-button-font-weight: 600;
--mdk-button-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.04);

Choose a reason for hiding this comment

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

I think we don’t need to mention the word “button” here and can use it somewhere else later if needed

Copy link
Author

Choose a reason for hiding this comment

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

updated removing button prefix and wired the new names through the button styles:

Remove danger/color props in favor of variant-only usage, and update size mapping and docs to match the new API.
Rename core tokens to remove button-specific prefixes and update button styles to reference the new variables.
@boris91 boris91 merged commit a1af165 into tetherto:staging Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants