Skip to content

Commit

Permalink
Update the examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sajadevo committed Feb 14, 2022
1 parent 8d2a0c2 commit d124802
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 63 deletions.
54 changes: 26 additions & 28 deletions src/examples/Navbars/DefaultNavbar/DefaultNavbarLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,33 @@ import MDTypography from "components/MDTypography";

function DefaultNavbarLink({ icon, name, route, light }) {
return (
<>
<MDBox
component={Link}
to={route}
mx={1}
p={1}
display="flex"
alignItems="center"
sx={{ cursor: "pointer", userSelect: "none" }}
<MDBox
component={Link}
to={route}
mx={1}
p={1}
display="flex"
alignItems="center"
sx={{ cursor: "pointer", userSelect: "none" }}
>
<Icon
sx={{
color: ({ palette: { white, secondary } }) => (light ? white.main : secondary.main),
verticalAlign: "middle",
}}
>
<Icon
sx={{
color: ({ palette: { white, secondary } }) => (light ? white.main : secondary.main),
verticalAlign: "middle",
}}
>
{icon}
</Icon>
<MDTypography
variant="button"
fontWeight="regular"
color={light ? "white" : "dark"}
textTransform="capitalize"
sx={{ width: "100%", lineHeight: 0 }}
>
&nbsp;{name}
</MDTypography>
</MDBox>
</>
{icon}
</Icon>
<MDTypography
variant="button"
fontWeight="regular"
color={light ? "white" : "dark"}
textTransform="capitalize"
sx={{ width: "100%", lineHeight: 0 }}
>
&nbsp;{name}
</MDTypography>
</MDBox>
);
}

Expand Down
68 changes: 33 additions & 35 deletions src/examples/Sidenav/SidenavCollapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,46 +41,44 @@ function SidenavCollapse({ icon, name, active, ...rest }) {
const { miniSidenav, transparentSidenav, whiteSidenav, darkMode, sidenavColor } = controller;

return (
<>
<ListItem component="li">
<MDBox
{...rest}
<ListItem component="li">
<MDBox
{...rest}
sx={(theme) =>
collapseItem(theme, {
active,
transparentSidenav,
whiteSidenav,
darkMode,
sidenavColor,
})
}
>
<ListItemIcon
sx={(theme) =>
collapseItem(theme, {
active,
collapseIconBox(theme, { transparentSidenav, whiteSidenav, darkMode, active })
}
>
{typeof icon === "string" ? (
<Icon sx={(theme) => collapseIcon(theme, { active })}>{icon}</Icon>
) : (
icon
)}
</ListItemIcon>

<ListItemText
primary={name}
sx={(theme) =>
collapseText(theme, {
miniSidenav,
transparentSidenav,
whiteSidenav,
darkMode,
sidenavColor,
active,
})
}
>
<ListItemIcon
sx={(theme) =>
collapseIconBox(theme, { transparentSidenav, whiteSidenav, darkMode, active })
}
>
{typeof icon === "string" ? (
<Icon sx={(theme) => collapseIcon(theme, { active })}>{icon}</Icon>
) : (
icon
)}
</ListItemIcon>

<ListItemText
primary={name}
sx={(theme) =>
collapseText(theme, {
miniSidenav,
transparentSidenav,
whiteSidenav,
active,
})
}
/>
</MDBox>
</ListItem>
</>
/>
</MDBox>
</ListItem>
);
}

Expand Down
1 change: 1 addition & 0 deletions src/layouts/dashboard/components/Projects/data/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable react/prop-types */
/* eslint-disable react/function-component-definition */
/**
=========================================================
* Material Dashboard 2 React - v2.1.0
Expand Down
1 change: 1 addition & 0 deletions src/layouts/rtl/components/Projects/data/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable react/prop-types */
/* eslint-disable react/function-component-definition */
/**
=========================================================
* Material Dashboard 2 React - v2.1.0
Expand Down
1 change: 1 addition & 0 deletions src/layouts/tables/data/authorsTableData.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable react/prop-types */
/* eslint-disable react/function-component-definition */
/**
=========================================================
* Material Dashboard 2 React - v2.1.0
Expand Down
1 change: 1 addition & 0 deletions src/layouts/tables/data/projectsTableData.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable react/prop-types */
/* eslint-disable react/function-component-definition */
/**
=========================================================
* Material Dashboard 2 React - v2.1.0
Expand Down

0 comments on commit d124802

Please sign in to comment.