diff --git a/README.md b/README.md
index b604ceef2..4b9ad252d 100644
--- a/README.md
+++ b/README.md
@@ -7,17 +7,22 @@
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
-
-
+
+
diff --git a/components/layout/navbar.tsx b/components/layout/navbar.tsx
index b3988e61e..d02af6a0a 100644
--- a/components/layout/navbar.tsx
+++ b/components/layout/navbar.tsx
@@ -174,7 +174,7 @@ export default function Navbar({
>
Navbar example that you can use in your Tailwi
-
-
-
-
- Material Tailwind
-
-
+
+
+
+ Buy Now
+
+
+
+ )}
+
+
+
+
```jsx
-import { Navbar, Button, Typography } from "@material-tailwind/react";
+import { useState, useEffect } from "react";
+import {
+ Navbar,
+ MobileNav,
+ Typography,
+ Button,
+ IconButton,
+} from "@material-tailwind/react";
-export default function Example() {
- const icon = (
-
-
-
+export default function Test() {
+ const [openNav, setOpenNav] = useState(false);
+
+ useEffect(() => {
+ window.addEventListener(
+ "resize",
+ () => window.innerWidth >= 960 && setOpenNav(false)
+ );
+ }, []);
+
+ const navList = (
+
);
return (
-
-
+
+
- Material Tailwind
+ Material Tailwind
-
-
- Buy Now
+ {navList}
+
+ Buy Now
+ setOpenNav(!openNav)}
+ >
+ {openNav ? (
+
+
+
+ ) : (
+
+
+
+ )}
+
+
+ {navList}
+
+ Buy Now
+
+
);
}
diff --git a/packages/material-tailwind-react/README.md b/packages/material-tailwind-react/README.md
index fa2781717..27ff9ef6f 100644
--- a/packages/material-tailwind-react/README.md
+++ b/packages/material-tailwind-react/README.md
@@ -8,7 +8,7 @@
-
+
diff --git a/packages/material-tailwind-react/package.json b/packages/material-tailwind-react/package.json
index b64852432..0d631afdd 100644
--- a/packages/material-tailwind-react/package.json
+++ b/packages/material-tailwind-react/package.json
@@ -1,7 +1,7 @@
{
"name": "@material-tailwind/react",
"homepage": "https://material-tailwind.com",
- "version": "1.2.0",
+ "version": "1.2.1",
"description": "@material-tailwind/react is an easy-to-use components library for ReactJS & Tailwind CSS inspired by Material Design.",
"repository": "https://github.com/creativetimofficial/material-tailwind",
"license": "MIT",
diff --git a/packages/material-tailwind-react/src/components/Navbar/MobileNav.tsx b/packages/material-tailwind-react/src/components/Navbar/MobileNav.tsx
index 57ec11dbb..a69ce2170 100644
--- a/packages/material-tailwind-react/src/components/Navbar/MobileNav.tsx
+++ b/packages/material-tailwind-react/src/components/Navbar/MobileNav.tsx
@@ -64,7 +64,7 @@ export const MobileNav = React.forwardRef(
},
mount: {
opacity: 1,
- height: `${mobileNavRef.current?.scrollHeight + 16}px`,
+ height: `${mobileNavRef.current?.scrollHeight}px`,
transition: { duration: 0.3, times: "[0.4, 0, 0.2, 1]" },
},
};
diff --git a/packages/material-tailwind-react/src/theme/components/avatar/index.ts b/packages/material-tailwind-react/src/theme/components/avatar/index.ts
index 0cba34c90..5a0e2d588 100644
--- a/packages/material-tailwind-react/src/theme/components/avatar/index.ts
+++ b/packages/material-tailwind-react/src/theme/components/avatar/index.ts
@@ -48,32 +48,32 @@ export const avatar: AvatarStyleTypes = {
},
sizes: {
xs: {
- with: "w-6",
+ width: "w-6",
height: "h-6",
borderRadius: "rounded-md",
},
sm: {
- with: "w-9",
+ width: "w-9",
height: "h-9",
borderRadius: "rounded-md",
},
md: {
- with: "w-12",
+ width: "w-12",
height: "h-12",
borderRadius: "rounded-lg",
},
lg: {
- with: "w-[58px]",
+ width: "w-[58px]",
height: "h-[58px]",
borderRadius: "rounded-lg",
},
xl: {
- with: "w-[74px]",
+ width: "w-[74px]",
height: "h-[74px]",
borderRadius: "rounded-xl",
},
xxl: {
- with: "w-[110px]",
+ width: "w-[110px]",
height: "h-[110px]",
borderRadius: "rounded-2xl",
},
diff --git a/packages/material-tailwind-react/src/theme/components/navbar/index.ts b/packages/material-tailwind-react/src/theme/components/navbar/index.ts
index 450841b04..0fe9b8ca1 100644
--- a/packages/material-tailwind-react/src/theme/components/navbar/index.ts
+++ b/packages/material-tailwind-react/src/theme/components/navbar/index.ts
@@ -59,9 +59,7 @@ export const navbar: NavbarStylesType = {
base: {
navbar: {
initial: {
- display: "flex",
- flexWrap: "flex-nowrap",
- justifyContent: "justify-start",
+ display: "block",
width: "w-full",
maxWidth: "max-w-screen-2xl",
borderRadius: "rounded-xl",
@@ -88,7 +86,6 @@ export const navbar: NavbarStylesType = {
display: "block",
width: "w-full",
basis: "basis-full",
- rounded: "rounded-xl",
overflow: "overflow-hidden",
},
},
diff --git a/pages/docs/[...slug].tsx b/pages/docs/[...slug].tsx
index 79c34c98d..94d11d02b 100644
--- a/pages/docs/[...slug].tsx
+++ b/pages/docs/[...slug].tsx
@@ -61,6 +61,7 @@ import {
MenuHandler,
MenuList,
MenuItem,
+ MobileNav,
Navbar,
Option,
Popover,
@@ -121,17 +122,17 @@ const components = {
),
p: (props) => (
-
+
),
- hr: () => ,
+ hr: () => ,
a: (props) => (
),
@@ -145,13 +146,13 @@ const components = {
tr: (props) => ,
th: (props) => (
),
td: (props) => (
),
@@ -192,6 +193,7 @@ const components = {
MenuHandler,
MenuList,
MenuItem,
+ MobileNav,
Navbar,
Option,
Popover,