|
17 | 17 | 'flex flex-row items-center justify-center rounded-sm', |
18 | 18 | size === '2xs' || size === 'xs' ? 'gap-2xs' : 'gap-xs', |
19 | 19 | 'transition-all whitespace-nowrap leading-none font-medium max-h-fit', |
20 | | - tone === 'toggle' ? 'px-2xs min-h-[28px]' : [ |
21 | | - hasLabel ? 'px-xs py-2xs' : 'p-3xs m-3xs', |
22 | | - ], |
| 20 | + tone === 'toggle' |
| 21 | + ? 'px-2xs min-h-[28px]' |
| 22 | + : [hasLabel ? 'px-xs py-2xs' : 'p-3xs m-3xs'], |
23 | 23 | tone !== 'empty' && 'border', |
24 | 24 | computedTextSize, |
25 | 25 | truncateText && 'min-w-0', |
|
44 | 44 | 'text-neutral-900 bg-100 border-neutral-400 hover:bg-neutral-200', |
45 | 45 | 'text-white bg-neutral-800 border-neutral-600 hover:bg-neutral-700', |
46 | 46 | ), |
| 47 | + navFlat: |
| 48 | + 'text-white bg-neutral-800 border-neutral-600 hover:bg-neutral-700', |
47 | 49 | toggle: clsx( |
48 | 50 | 'font-mono text-left truncate relative', |
49 | 51 | themeClasses( |
|
76 | 78 | { |
77 | 79 | neutral: themeClasses('bg-neutral-100', 'bg-neutral-600'), |
78 | 80 | flat: themeClasses('bg-neutral-200', 'bg-neutral-700'), |
| 81 | + navFlat: 'bg-neutral-700', |
79 | 82 | toggle: '', |
80 | 83 | action: themeClasses('bg-[#2583EC]', 'bg-[#1D5BA0]'), |
81 | 84 | warning: themeClasses('bg-white', 'bg-[#67452D]'), |
|
129 | 132 | </slot> |
130 | 133 | <slot v-else>{{ label }}</slot> |
131 | 134 | </TruncateWithTooltip> |
132 | | - <span |
133 | | - v-else-if="hasLabel" |
134 | | - :class="labelClasses" |
135 | | - > |
| 135 | + <span v-else-if="hasLabel" :class="labelClasses"> |
136 | 136 | <slot v-if="confirmClick && confirmFirstClickAt" name="confirm-click"> |
137 | 137 | | |
138 | 138 | {{ |
|
161 | 161 | { |
162 | 162 | neutral: '', |
163 | 163 | flat: '', |
| 164 | + navFlat: '', |
164 | 165 | toggle: '', |
165 | 166 | action: '', |
166 | 167 | warning: '', |
@@ -414,7 +415,7 @@ const labelClasses = computed(() => { |
414 | 415 | return tw`py-2xs text-[13px] font-normal`; |
415 | 416 | } |
416 | 417 |
|
417 | | - return props.size === '2xs' || props.size === 'xs' ? tw`py-3xs` : tw`py-2xs`; |
| 418 | + return props.size === "2xs" || props.size === "xs" ? tw`py-3xs` : tw`py-2xs`; |
418 | 419 | }); |
419 | 420 |
|
420 | 421 | const tooltipObject = computed(() => |
@@ -442,6 +443,7 @@ export type ButtonSizes = "2xs" | "xs" | "sm" | "md" | "lg" | "xl"; |
442 | 443 | export const BUTTON_TONES = [ |
443 | 444 | "neutral", |
444 | 445 | "flat", // similar to neutral, but has the same bg as the content its sitting on top of |
| 446 | + "navFlat", // flat, but for the nav where we dont have light mode styles |
445 | 447 | "toggle", // alternative neutral style used for buttons in the same area as ExploreModeTile |
446 | 448 | "action", |
447 | 449 | "warning", |
|
0 commit comments