@nethru/ui 1.0.55 → 1.0.56

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.
Files changed (2) hide show
  1. package/dist/Frame.js +0 -18
  2. package/package.json +1 -1
package/dist/Frame.js CHANGED
@@ -1,4 +1,3 @@
1
- import { useEffect, useRef, useState } from "react";
2
1
  import { Box } from '@mui/material';
3
2
  import { SidebarContextProvider } from './sidebar/SidebarContext';
4
3
  import { variables } from './variables';
@@ -13,8 +12,6 @@ export default function Frame({
13
12
  menu,
14
13
  menuIcons = {}
15
14
  }) {
16
- const ref = useRef();
17
- const [width, setWidth] = useState('unset');
18
15
  const containerStyles = {
19
16
  display: 'flex',
20
17
  flexGrow: 1,
@@ -27,17 +24,6 @@ export default function Frame({
27
24
  overflow: 'auto',
28
25
  padding: '20px 40px'
29
26
  };
30
- useEffect(() => {
31
- if (!ref.current) return;
32
- const observer = new ResizeObserver(entries => {
33
- const width = entries.length > 0 ? entries[0].borderBoxSize[0].inlineSize : 0;
34
- setWidth(width > 0 ? `${width}px` : 'unset');
35
- });
36
- observer.observe(ref.current);
37
- return () => {
38
- observer.disconnect();
39
- };
40
- }, []);
41
27
  return /*#__PURE__*/_jsxs(_Fragment, {
42
28
  children: [appBar, /*#__PURE__*/_jsxs(Box, {
43
29
  sx: containerStyles,
@@ -46,13 +32,9 @@ export default function Frame({
46
32
  icons: menuIcons,
47
33
  children: sideBar
48
34
  }), /*#__PURE__*/_jsxs(Box, {
49
- ref: ref,
50
35
  component: "section",
51
36
  sx: contentStyles,
52
37
  children: [/*#__PURE__*/_jsx("main", {
53
- style: {
54
- maxWidth: width
55
- },
56
38
  children: children
57
39
  }), footer]
58
40
  })]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nethru/ui",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "/dist"