MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / getButtonClass

Function getButtonClass

src/theme/componentStyles.ts:78–92  ·  view source on GitHub ↗
(
  variant: keyof typeof buttonStyles.variants = 'secondary',
  size: keyof typeof buttonStyles.sizes = 'md',
  disabled = false
)

Source from the content-addressed store, hash-verified

76
77// Helper function to compose button classes
78export function getButtonClass(
79 variant: keyof typeof buttonStyles.variants = 'secondary',
80 size: keyof typeof buttonStyles.sizes = 'md',
81 disabled = false
82): string {
83 const classes: string[] = [
84 buttonStyles.base,
85 buttonStyles.sizes[size],
86 buttonStyles.variants[variant],
87 ];
88 if (disabled) {
89 classes.push(buttonStyles.disabled);
90 }
91 return classes.join(' ');
92}
93
94// ============================================
95// SHARED ACTION BUTTON STYLES

Callers 2

UrlInputModalFunction · 0.90
ConfirmationHostFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected