Skip to content

Commit ed0e054

Browse files
committed
Updated sidenavbar
1 parent 8722989 commit ed0e054

File tree

12 files changed

+99
-56
lines changed

12 files changed

+99
-56
lines changed

dist/components/nav/components/NavItem.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/components/sideNavbar/SideNavbar.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.css

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -981,11 +981,13 @@ option {
981981
.logo {
982982
height: auto;
983983
width: auto;
984-
margin: 1.5rem;
984+
margin: 1.8rem;
985985
}
986986
@media (min-width: 1024px) {
987987
.logo {
988-
margin: 2.5rem;
988+
margin-left: 3rem;
989+
margin-top: 1.8rem;
990+
margin-bottom: 1.8rem;
989991
}
990992
}
991993

@@ -1049,10 +1051,6 @@ a.card-link {
10491051
padding: 0;
10501052
}
10511053

1052-
.Toastify__toast-body {
1053-
text-align: center;
1054-
}
1055-
10561054
.Toastify__toast {
10571055
border-radius: 0px;
10581056
font-weight: 600;
@@ -1062,12 +1060,25 @@ a.card-link {
10621060

10631061
.Toastify__toast-icon {
10641062
margin-left: 10px;
1065-
margin-right: 20px;
1066-
width: 30px;
1063+
width: auto;
1064+
font-size: 2.5rem;
10671065
}
10681066

10691067
.Toastify__toast-body {
10701068
font-family: var(--texmo-font);
1069+
justify-content: center;
1070+
text-align: center;
1071+
}
1072+
1073+
.Toastify__toast-body > div:last-child {
1074+
display: flex;
1075+
flex: initial;
1076+
margin-top: 3px;
1077+
align-items: center;
1078+
}
1079+
1080+
i.toast-icon {
1081+
display: flex;
10711082
}
10721083

10731084
.nav-link {
@@ -13386,6 +13397,10 @@ textarea.form-control-lg {
1338613397
margin-left: 10%;
1338713398
height: 1px;
1338813399
}
13400+
.sidenav-item:hover {
13401+
background: #f9f8f9;
13402+
text-decoration: underline !important;
13403+
}
1338913404

1339013405
.sidenav-link {
1339113406
padding: 16px 46px;

dist/index.es.css

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -981,11 +981,13 @@ option {
981981
.logo {
982982
height: auto;
983983
width: auto;
984-
margin: 1.5rem;
984+
margin: 1.8rem;
985985
}
986986
@media (min-width: 1024px) {
987987
.logo {
988-
margin: 2.5rem;
988+
margin-left: 3rem;
989+
margin-top: 1.8rem;
990+
margin-bottom: 1.8rem;
989991
}
990992
}
991993

@@ -1049,10 +1051,6 @@ a.card-link {
10491051
padding: 0;
10501052
}
10511053

1052-
.Toastify__toast-body {
1053-
text-align: center;
1054-
}
1055-
10561054
.Toastify__toast {
10571055
border-radius: 0px;
10581056
font-weight: 600;
@@ -1062,12 +1060,25 @@ a.card-link {
10621060

10631061
.Toastify__toast-icon {
10641062
margin-left: 10px;
1065-
margin-right: 20px;
1066-
width: 30px;
1063+
width: auto;
1064+
font-size: 2.5rem;
10671065
}
10681066

10691067
.Toastify__toast-body {
10701068
font-family: var(--texmo-font);
1069+
justify-content: center;
1070+
text-align: center;
1071+
}
1072+
1073+
.Toastify__toast-body > div:last-child {
1074+
display: flex;
1075+
flex: initial;
1076+
margin-top: 3px;
1077+
align-items: center;
1078+
}
1079+
1080+
i.toast-icon {
1081+
display: flex;
10711082
}
10721083

10731084
.nav-link {
@@ -13386,6 +13397,10 @@ textarea.form-control-lg {
1338613397
margin-left: 10%;
1338713398
height: 1px;
1338813399
}
13400+
.sidenav-item:hover {
13401+
background: #f9f8f9;
13402+
text-decoration: underline !important;
13403+
}
1338913404

1339013405
.sidenav-link {
1339113406
padding: 16px 46px;

dist/index.es.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27173,7 +27173,6 @@ var ProgressBar = function (_a) {
2717327173
};
2717427174

2717527175
var SideNavbar = function (_a) {
27176-
// const { open } = useNavContext();
2717727176
var className = _a.className, children = _a.children, rest = __rest(_a, ["className", "children"]);
2717827177
return (React.createElement("div", __assign$1({ className: classNames('d-none d-md-flex flex-column side-navbar-container', className, 'col-auto') }, rest), children));
2717927178
};
@@ -29244,15 +29243,9 @@ var NavItem = function (_a) {
2924429243
var route = _a.route, icon = _a.icon, text = _a.text;
2924529244
var open = useNavContext().open;
2924629245
var NavLink = useTexmoContext().navLink;
29247-
var linkClass = function (isActive) {
29248-
return isActive ? 'nav-link active' : 'nav-link link-dark';
29249-
};
2925029246
return (React.createElement(BootstrapNav.Item, { className: "sidenav-item" },
2925129247
React.createElement(OverlayTrigger$1, { placement: "right", overlay: !open ? React.createElement(Tooltip$1, null, text) : React.createElement(React.Fragment, null) },
29252-
React.createElement(NavLink, { to: route, className: function (_a) {
29253-
var isActive = _a.isActive;
29254-
return classNames('d-flex align-items-center sidenav-link', linkClass(isActive));
29255-
} },
29248+
React.createElement(NavLink, { to: route, className: function () { return 'd-flex align-items-center sidenav-link nav-link'; } },
2925629249
React.createElement("div", { className: "d-flex justify-content-center nav-item-icon" },
2925729250
React.createElement(TexmoIcon, { icon: icon, height: 28 })),
2925829251
React.createElement("div", { className: classNames('d-flex justify-content-start nav-item-text', open ? 'opened' : null) }, text)))));

dist/index.min.css

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -981,11 +981,13 @@ option {
981981
.logo {
982982
height: auto;
983983
width: auto;
984-
margin: 1.5rem;
984+
margin: 1.8rem;
985985
}
986986
@media (min-width: 1024px) {
987987
.logo {
988-
margin: 2.5rem;
988+
margin-left: 3rem;
989+
margin-top: 1.8rem;
990+
margin-bottom: 1.8rem;
989991
}
990992
}
991993

@@ -1049,10 +1051,6 @@ a.card-link {
10491051
padding: 0;
10501052
}
10511053

1052-
.Toastify__toast-body {
1053-
text-align: center;
1054-
}
1055-
10561054
.Toastify__toast {
10571055
border-radius: 0px;
10581056
font-weight: 600;
@@ -1062,12 +1060,25 @@ a.card-link {
10621060

10631061
.Toastify__toast-icon {
10641062
margin-left: 10px;
1065-
margin-right: 20px;
1066-
width: 30px;
1063+
width: auto;
1064+
font-size: 2.5rem;
10671065
}
10681066

10691067
.Toastify__toast-body {
10701068
font-family: var(--texmo-font);
1069+
justify-content: center;
1070+
text-align: center;
1071+
}
1072+
1073+
.Toastify__toast-body > div:last-child {
1074+
display: flex;
1075+
flex: initial;
1076+
margin-top: 3px;
1077+
align-items: center;
1078+
}
1079+
1080+
i.toast-icon {
1081+
display: flex;
10711082
}
10721083

10731084
.nav-link {
@@ -13386,6 +13397,10 @@ textarea.form-control-lg {
1338613397
margin-left: 10%;
1338713398
height: 1px;
1338813399
}
13400+
.sidenav-item:hover {
13401+
background: #f9f8f9;
13402+
text-decoration: underline !important;
13403+
}
1338913404

1339013405
.sidenav-link {
1339113406
padding: 16px 46px;

dist/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scss/App.scss

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,12 @@ option {
3434
.logo {
3535
height: auto;
3636
width: auto;
37-
margin: 1.5rem;
37+
margin: 1.8rem;
3838

3939
@media(min-width: 1024px) {
40-
margin: 2.5rem;
40+
margin-left: 3rem;
41+
margin-top: 1.8rem;
42+
margin-bottom: 1.8rem;
4143
}
4244
}
4345

@@ -103,10 +105,6 @@ a.card-link {
103105
padding: 0;
104106
}
105107

106-
.Toastify__toast-body {
107-
text-align: center;
108-
}
109-
110108
.Toastify__toast {
111109
border-radius: 0px;
112110
font-weight: 600;
@@ -116,12 +114,25 @@ a.card-link {
116114

117115
.Toastify__toast-icon {
118116
margin-left: 10px;
119-
margin-right: 20px;
120-
width: 30px;
117+
width: auto;
118+
font-size: 2.5rem;
121119
}
122120

123121
.Toastify__toast-body {
124122
font-family: var(--texmo-font);
123+
justify-content: center;
124+
text-align: center;
125+
}
126+
127+
.Toastify__toast-body > div:last-child {
128+
display: flex;
129+
flex: initial;
130+
margin-top: 3px;
131+
align-items: center;
132+
}
133+
134+
i.toast-icon {
135+
display: flex;
125136
}
126137

127138
.nav-link {

src/components/nav/Nav.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
margin-left: 10%;
4949
height: 1px;
5050
}
51+
52+
&:hover {
53+
background: #f9f8f9;
54+
text-decoration: underline !important;
55+
}
5156
}
5257

5358
.sidenav-link {

src/components/nav/components/NavItem.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ const NavItem = ({ route, icon, text }: NavItemProps) => {
1818
const { open } = useNavContext();
1919
const { navLink: NavLink } = useTexmoContext();
2020

21-
const linkClass = (isActive: boolean): string => {
22-
return isActive ? 'nav-link active' : 'nav-link link-dark';
23-
};
24-
2521
return (
2622
<Nav.Item className="sidenav-item">
2723
<OverlayTrigger
@@ -30,12 +26,7 @@ const NavItem = ({ route, icon, text }: NavItemProps) => {
3026
>
3127
<NavLink
3228
to={route}
33-
className={({ isActive }) =>
34-
classNames(
35-
'd-flex align-items-center sidenav-link',
36-
linkClass(isActive)
37-
)
38-
}
29+
className={() => 'd-flex align-items-center sidenav-link nav-link'}
3930
>
4031
<div className="d-flex justify-content-center nav-item-icon">
4132
<TexmoIcon icon={icon} height={28} />

src/components/sideNavbar/SideNavbar.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import React from 'react';
55
export interface SideNavbarProps extends React.HTMLProps<HTMLDivElement> {}
66

77
const SideNavbar = ({ className, children, ...rest }: SideNavbarProps) => {
8-
// const { open } = useNavContext();
9-
108
return (
119
<div
1210
className={classNames(

0 commit comments

Comments
 (0)