@carrier-dpx/air-react-library 0.2.0 → 0.2.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carrier-dpx/air-react-library",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Air web React component library for Figma Make",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -90,7 +90,6 @@ const Button = forwardRef<HTMLButtonElement, ButtonProps>(
90
90
  } as CSSObject)
91
91
  }
92
92
  style={{
93
- textTransform: "unset",
94
93
  border: variant === "text" ? "none" : "",
95
94
  }}
96
95
  {...rest}
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from "react";
1
+ import React, { ReactNode, useEffect } from "react";
2
2
  import { Theme, ThemeProvider, createTheme } from "@mui/material/styles";
3
3
  import { airDarkThemeOptions, fleetThemeOptions } from "./fleetThemeOptions";
4
4
 
@@ -32,6 +32,17 @@ const FleetThemeProvider: React.FC<ThemeProviderProps> = ({
32
32
  }) => {
33
33
  const resolvedTheme = typeof theme === "string" ? ThemeMap[theme] : theme;
34
34
 
35
+ // Load Nunito Sans font
36
+ useEffect(() => {
37
+ // Check if font is already loaded
38
+ if (!document.querySelector('link[href*="Nunito+Sans"]')) {
39
+ const link = document.createElement('link');
40
+ link.href = 'https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@200;300;400;600;700;800;900&display=swap';
41
+ link.rel = 'stylesheet';
42
+ document.head.appendChild(link);
43
+ }
44
+ }, []);
45
+
35
46
  return <ThemeProvider theme={resolvedTheme}>{children}</ThemeProvider>;
36
47
  };
37
48
 
@@ -78,6 +78,7 @@ const fleetComponents: Components = {
78
78
  },
79
79
  styleOverrides: {
80
80
  root: {
81
+ textTransform: "none",
81
82
  "&.MuiButton-sizeXsmall": {
82
83
  ...fleetTypography.body3Bold,
83
84
  height: "24px",