Yuki Takei 2 лет назад
Родитель
Сommit
06e99b5020

+ 2 - 7
apps/app/src/components/Sidebar/SidebarNav/PrimaryItems.module.scss

@@ -1,18 +1,13 @@
 @use '@growi/core/scss/bootstrap/init' as bs;
 @use '@growi/core/scss/bootstrap/init' as bs;
 
 
-@use '~/styles/variables' as var;
-
 @use '../button-styles';
 @use '../button-styles';
 
 
-@use './variables' as sidebarNavVar;
+@use '../variables' as sidebarVar;
 
 
 .grw-primary-items :global {
 .grw-primary-items :global {
   .btn {
   .btn {
     @extend %btn-basis;
     @extend %btn-basis;
 
 
-    width: var.$grw-sidebar-nav-width;
-    height: sidebarNavVar.$grw-sidebar-primary-button-height;
-
     i {
     i {
       opacity: 0.7;
       opacity: 0.7;
 
 
@@ -26,7 +21,7 @@
 
 
 // Add indicator
 // Add indicator
 .grw-primary-items :global {
 .grw-primary-items :global {
-  $btn-height: sidebarNavVar.$grw-sidebar-primary-button-height;
+  $btn-height: sidebarVar.$grw-sidebar-button-height;
   $btn-active-indicator-height: 34px;
   $btn-active-indicator-height: 34px;
 
 
   .btn {
   .btn {

+ 1 - 1
apps/app/src/components/Sidebar/SidebarNav/PrimaryItems.tsx

@@ -74,7 +74,7 @@ const PrimaryItem: FC<PrimaryItemProps> = (props: PrimaryItemProps) => {
     <button
     <button
       type="button"
       type="button"
       data-testid={`grw-sidebar-nav-primary-${labelForTestId}`}
       data-testid={`grw-sidebar-nav-primary-${labelForTestId}`}
-      className={`d-block btn btn-primary ${indicatorClass}`}
+      className={`btn btn-primary ${indicatorClass}`}
       onClick={itemClickedHandler}
       onClick={itemClickedHandler}
       onMouseEnter={mouseEnteredHandler}
       onMouseEnter={mouseEnteredHandler}
     >
     >

+ 1 - 7
apps/app/src/components/Sidebar/SidebarNav/SecondaryItems.module.scss

@@ -1,19 +1,13 @@
 @use '@growi/core/scss/bootstrap/init' as bs;
 @use '@growi/core/scss/bootstrap/init' as bs;
 
 
-@use '~/styles/variables' as var;
-
 @use '../button-styles';
 @use '../button-styles';
 
 
-@use './variables' as sidebarNavVar;
 
 
 .grw-secondary-items :global {
 .grw-secondary-items :global {
   .btn {
   .btn {
     @extend %btn-basis;
     @extend %btn-basis;
 
 
-    width: var.$grw-sidebar-nav-width;
-    height: sidebarNavVar.$grw-sidebar-primary-button-height;
-
-    i {
+    span {
       opacity: 0.6;
       opacity: 0.6;
 
 
       &:hover,
       &:hover,

+ 2 - 2
apps/app/src/components/Sidebar/SidebarNav/SecondaryItems.tsx

@@ -29,11 +29,11 @@ const SecondaryItem: FC<SecondaryItemProps> = (props: SecondaryItemProps) => {
   return (
   return (
     <Link
     <Link
       href={href}
       href={href}
-      className="d-block btn btn-primary"
+      className="d-block btn btn-primary d-flex align-items-center justify-content-center"
       target={`${isBlank ? '_blank' : ''}`}
       target={`${isBlank ? '_blank' : ''}`}
       prefetch={false}
       prefetch={false}
     >
     >
-      <i className="material-symbols-outlined">{iconName}</i>
+      <span className="material-symbols-outlined">{iconName}</span>
     </Link>
     </Link>
   );
   );
 };
 };

+ 2 - 2
apps/app/src/components/Sidebar/SidebarNav/SkeletonItem.module.scss

@@ -1,9 +1,9 @@
 @use '@growi/core/scss/bootstrap/init' as bs;
 @use '@growi/core/scss/bootstrap/init' as bs;
 
 
-@use './variables' as sidebarNavVar;
+@use '../variables' as sidebarVar;
 
 
 .grw-skeleton-item :global {
 .grw-skeleton-item :global {
-  height: sidebarNavVar.$grw-sidebar-primary-button-height;
+  height: sidebarVar.$grw-sidebar-button-height;
   padding: .75rem;
   padding: .75rem;
 
 
   .grw-skeleton {
   .grw-skeleton {

+ 0 - 1
apps/app/src/components/Sidebar/SidebarNav/_variables.scss

@@ -1 +0,0 @@
-$grw-sidebar-primary-button-height: 50px;

+ 6 - 0
apps/app/src/components/Sidebar/_button-styles.scss

@@ -1,9 +1,15 @@
 @use '~/styles/variables' as var;
 @use '~/styles/variables' as var;
 
 
+@use './variables' as sidebarVar;
+
+
 %btn-basis {
 %btn-basis {
   --bs-btn-padding-x: 0;
   --bs-btn-padding-x: 0;
   --bs-btn-padding-y: 0;
   --bs-btn-padding-y: 0;
 
 
+  width: var.$grw-sidebar-nav-width;
+  height: sidebarVar.$grw-sidebar-button-height;
+
   line-height: 1em;
   line-height: 1em;
   border: 0;
   border: 0;
   border-radius: 0;
   border-radius: 0;

+ 1 - 0
apps/app/src/components/Sidebar/_variables.scss

@@ -0,0 +1 @@
+$grw-sidebar-button-height: 50px;