@trackunit/react-components 0.4.0 → 0.4.1

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/index.cjs.js CHANGED
@@ -1504,9 +1504,7 @@ const Breadcrumb = ({ className, dataTestId, breadcrumbItems, back }) => {
1504
1504
  * @param {BreadcrumbContainerProps} props - The props for the BreadcrumbContainer component
1505
1505
  */
1506
1506
  const BreadcrumbContainer = ({ dataTestId, breadcrumbItems }) => {
1507
- const { width } = useResize();
1508
- const isMediumScreen = width <= 1024;
1509
- const isSmallScreen = width <= 480;
1507
+ const { isMd: isMediumScreen, isXs: isSmallScreen } = useViewportSize();
1510
1508
  if (isSmallScreen) {
1511
1509
  return jsxRuntime.jsx(BreadcrumbForSmallScreen, { breadcrumbItems: breadcrumbItems, dataTestId: `smallScreen-${dataTestId}` });
1512
1510
  }
package/index.esm.js CHANGED
@@ -1484,9 +1484,7 @@ const Breadcrumb = ({ className, dataTestId, breadcrumbItems, back }) => {
1484
1484
  * @param {BreadcrumbContainerProps} props - The props for the BreadcrumbContainer component
1485
1485
  */
1486
1486
  const BreadcrumbContainer = ({ dataTestId, breadcrumbItems }) => {
1487
- const { width } = useResize();
1488
- const isMediumScreen = width <= 1024;
1489
- const isSmallScreen = width <= 480;
1487
+ const { isMd: isMediumScreen, isXs: isSmallScreen } = useViewportSize();
1490
1488
  if (isSmallScreen) {
1491
1489
  return jsx(BreadcrumbForSmallScreen, { breadcrumbItems: breadcrumbItems, dataTestId: `smallScreen-${dataTestId}` });
1492
1490
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -4,7 +4,7 @@ export interface IndicatorProps extends CommonProps {
4
4
  /**
5
5
  * The icon to be rendered inside the indicator component
6
6
  */
7
- icon: JSX.Element;
7
+ icon?: JSX.Element;
8
8
  /**
9
9
  * A color token used to style the icon and the icon background
10
10
  */