umwd-components 0.1.46 → 0.1.47

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.
@@ -51,12 +51,13 @@ function Footer({
51
51
  VAT_number,
52
52
  company_socials,
53
53
  disclaimer_link,
54
- privacypolicy_link
54
+ privacypolicy_link,
55
+ maxWidth = "lg"
55
56
  }) {
56
57
  return /*#__PURE__*/React.createElement(material.AppBar, {
57
58
  position: "relative"
58
59
  }, /*#__PURE__*/React.createElement(material.Container, {
59
- maxWidth: "xl"
60
+ maxWidth: maxWidth
60
61
  }, /*#__PURE__*/React.createElement(material.Toolbar, {
61
62
  disableGutters: true
62
63
  }, /*#__PURE__*/React.createElement(material.Grid, {
@@ -81,12 +82,20 @@ function Footer({
81
82
  cursor: "pointer",
82
83
  flexDirection: "column",
83
84
  alignItems: "center",
84
- justifyContent: "center"
85
+ justifyContent: "flex-start",
86
+ height: "100%"
85
87
  }
86
88
  }, /*#__PURE__*/React.createElement(material.Typography, {
87
89
  variant: "h6",
88
90
  color: "#ffffff"
89
- }, site_title), logo && /*#__PURE__*/React.createElement(material.Box, null, /*#__PURE__*/React.createElement(Image, {
91
+ }, site_title), logo && /*#__PURE__*/React.createElement(material.Box, {
92
+ sx: {
93
+ display: "flex",
94
+ alignItems: "center",
95
+ justifyContent: "center",
96
+ height: "100%"
97
+ }
98
+ }, /*#__PURE__*/React.createElement(Image, {
90
99
  src: logo.url,
91
100
  width: logo.width,
92
101
  height: logo.height,
@@ -35,6 +35,7 @@ NavBar.propTypes = {
35
35
  name: PropTypes.string.isRequired,
36
36
  url: PropTypes.string.isRequired
37
37
  })),
38
+ maxWidth: PropTypes.string,
38
39
  prominent: PropTypes.bool
39
40
  };
40
41
  function NavBar({
@@ -42,12 +43,12 @@ function NavBar({
42
43
  logo,
43
44
  pages = [],
44
45
  tabs = [],
45
- maxWidth = "xl",
46
- prominent = false
46
+ maxWidth = "lg",
47
+ minHeight = "80px"
47
48
  }) {
48
49
  // handleMobileMenu
49
50
 
50
- const theme = styles.useTheme();
51
+ styles.useTheme();
51
52
  const [mobileNavOpen, setMobileNavOpen] = React.useState(false);
52
53
  const [currentTab, setCurrentTab] = React.useState(tabs[0]?.name || "");
53
54
  const handleOpenMobileMenu = e => {
@@ -67,17 +68,12 @@ function NavBar({
67
68
  maxWidth: maxWidth
68
69
  }, /*#__PURE__*/React.createElement(material.Toolbar, {
69
70
  disableGutters: true,
70
- sx: [{
71
- py: 1
72
- }, prominent && {
73
- alignItems: "flex-start",
74
- paddingTop: theme.spacing(4),
75
- paddingBottom: theme.spacing(4),
76
- // Override media queries injected by theme.mixins.toolbar
71
+ sx: {
72
+ py: 1,
77
73
  "@media all": {
78
- minHeight: 128
74
+ minHeight: minHeight
79
75
  }
80
- }]
76
+ }
81
77
  }, /*#__PURE__*/React.createElement(Link, {
82
78
  href: "/",
83
79
  style: {
@@ -47,12 +47,13 @@ function Footer({
47
47
  VAT_number,
48
48
  company_socials,
49
49
  disclaimer_link,
50
- privacypolicy_link
50
+ privacypolicy_link,
51
+ maxWidth = "lg"
51
52
  }) {
52
53
  return /*#__PURE__*/React.createElement(AppBar, {
53
54
  position: "relative"
54
55
  }, /*#__PURE__*/React.createElement(Container, {
55
- maxWidth: "xl"
56
+ maxWidth: maxWidth
56
57
  }, /*#__PURE__*/React.createElement(Toolbar, {
57
58
  disableGutters: true
58
59
  }, /*#__PURE__*/React.createElement(Grid, {
@@ -77,12 +78,20 @@ function Footer({
77
78
  cursor: "pointer",
78
79
  flexDirection: "column",
79
80
  alignItems: "center",
80
- justifyContent: "center"
81
+ justifyContent: "flex-start",
82
+ height: "100%"
81
83
  }
82
84
  }, /*#__PURE__*/React.createElement(Typography, {
83
85
  variant: "h6",
84
86
  color: "#ffffff"
85
- }, site_title), logo && /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Image, {
87
+ }, site_title), logo && /*#__PURE__*/React.createElement(Box, {
88
+ sx: {
89
+ display: "flex",
90
+ alignItems: "center",
91
+ justifyContent: "center",
92
+ height: "100%"
93
+ }
94
+ }, /*#__PURE__*/React.createElement(Image, {
86
95
  src: logo.url,
87
96
  width: logo.width,
88
97
  height: logo.height,
@@ -31,6 +31,7 @@ NavBar.propTypes = {
31
31
  name: PropTypes.string.isRequired,
32
32
  url: PropTypes.string.isRequired
33
33
  })),
34
+ maxWidth: PropTypes.string,
34
35
  prominent: PropTypes.bool
35
36
  };
36
37
  function NavBar({
@@ -38,12 +39,12 @@ function NavBar({
38
39
  logo,
39
40
  pages = [],
40
41
  tabs = [],
41
- maxWidth = "xl",
42
- prominent = false
42
+ maxWidth = "lg",
43
+ minHeight = "80px"
43
44
  }) {
44
45
  // handleMobileMenu
45
46
 
46
- const theme = useTheme();
47
+ useTheme();
47
48
  const [mobileNavOpen, setMobileNavOpen] = React.useState(false);
48
49
  const [currentTab, setCurrentTab] = React.useState(tabs[0]?.name || "");
49
50
  const handleOpenMobileMenu = e => {
@@ -63,17 +64,12 @@ function NavBar({
63
64
  maxWidth: maxWidth
64
65
  }, /*#__PURE__*/React.createElement(Toolbar, {
65
66
  disableGutters: true,
66
- sx: [{
67
- py: 1
68
- }, prominent && {
69
- alignItems: "flex-start",
70
- paddingTop: theme.spacing(4),
71
- paddingBottom: theme.spacing(4),
72
- // Override media queries injected by theme.mixins.toolbar
67
+ sx: {
68
+ py: 1,
73
69
  "@media all": {
74
- minHeight: 128
70
+ minHeight: minHeight
75
71
  }
76
- }]
72
+ }
77
73
  }, /*#__PURE__*/React.createElement(Link, {
78
74
  href: "/",
79
75
  style: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umwd-components",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "UMWD Component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -59,10 +59,11 @@ function Footer({
59
59
  company_socials,
60
60
  disclaimer_link,
61
61
  privacypolicy_link,
62
+ maxWidth = "lg",
62
63
  }) {
63
64
  return (
64
65
  <AppBar position="relative">
65
- <Container maxWidth="xl">
66
+ <Container maxWidth={maxWidth}>
66
67
  <Toolbar disableGutters>
67
68
  <Grid container sx={{ p: 2 }} spacing={2}>
68
69
  <Grid item xs={12} sm={4} align="center">
@@ -73,14 +74,22 @@ function Footer({
73
74
  cursor: "pointer",
74
75
  flexDirection: "column",
75
76
  alignItems: "center",
76
- justifyContent: "center",
77
+ justifyContent: "flex-start",
78
+ height: "100%",
77
79
  }}
78
80
  >
79
81
  <Typography variant="h6" color="#ffffff">
80
82
  {site_title}
81
83
  </Typography>
82
84
  {logo && (
83
- <Box>
85
+ <Box
86
+ sx={{
87
+ display: "flex",
88
+ alignItems: "center",
89
+ justifyContent: "center",
90
+ height: "100%",
91
+ }}
92
+ >
84
93
  <Image
85
94
  src={logo.url}
86
95
  width={logo.width}
@@ -47,6 +47,7 @@ NavBar.propTypes = {
47
47
  url: PropTypes.string.isRequired,
48
48
  })
49
49
  ),
50
+ maxWidth: PropTypes.string,
50
51
  prominent: PropTypes.bool,
51
52
  };
52
53
 
@@ -55,8 +56,8 @@ function NavBar({
55
56
  logo,
56
57
  pages = [],
57
58
  tabs = [],
58
- maxWidth = "xl",
59
- prominent = false,
59
+ maxWidth = "lg",
60
+ minHeight = "80px",
60
61
  }) {
61
62
  // handleMobileMenu
62
63
 
@@ -87,18 +88,12 @@ function NavBar({
87
88
  <Container maxWidth={maxWidth}>
88
89
  <Toolbar
89
90
  disableGutters
90
- sx={[
91
- { py: 1 },
92
- prominent && {
93
- alignItems: "flex-start",
94
- paddingTop: theme.spacing(4),
95
- paddingBottom: theme.spacing(4),
96
- // Override media queries injected by theme.mixins.toolbar
97
- "@media all": {
98
- minHeight: 128,
99
- },
91
+ sx={{
92
+ py: 1,
93
+ "@media all": {
94
+ minHeight: minHeight,
100
95
  },
101
- ]}
96
+ }}
102
97
  >
103
98
  {/* logo and site title for big screens */}
104
99
  <Link href="/" style={{ textDecoration: "none", color: "unset" }}>
@@ -96,5 +96,5 @@ AMH.args = {
96
96
  },
97
97
  ],
98
98
  maxWidth: "lg",
99
- prominent: true,
99
+ minHeight: "100px",
100
100
  };