@cambly/syntax-core 6.3.0 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -398,6 +398,15 @@ var Box_default = Box;
398
398
 
399
399
  // src/Badge/Badge.tsx
400
400
  import { jsx as jsx4 } from "react/jsx-runtime";
401
+ var textColorForBackgroundColor = (color) => {
402
+ switch (color) {
403
+ case "gray200":
404
+ case "yellow700":
405
+ return "gray900";
406
+ default:
407
+ return "white";
408
+ }
409
+ };
401
410
  var Badge = ({
402
411
  text,
403
412
  color = "primary700"
@@ -412,7 +421,7 @@ var Badge = ({
412
421
  children: /* @__PURE__ */ jsx4(
413
422
  Typography_default,
414
423
  {
415
- color: color === "yellow700" ? "gray900" : "white",
424
+ color: textColorForBackgroundColor(color),
416
425
  size: 100,
417
426
  weight: "bold",
418
427
  children: text