Просмотр исходного кода

re-organize .page-accessories-control styles

Yuki Takei 3 лет назад
Родитель
Сommit
fceb138d21

+ 5 - 0
packages/app/src/components/IdenticalPathPage.module.scss

@@ -0,0 +1,5 @@
+@use '~/styles/molecules/page-accessories-control';
+
+.grw-page-accessories-control :global {
+  @extend %grw-page-accessories-control;
+}

+ 4 - 1
packages/app/src/components/IdenticalPathPage.tsx

@@ -11,6 +11,9 @@ import PageListIcon from './Icons/PageListIcon';
 import { PageListItemL } from './PageList/PageListItemL';
 
 
+import styles from './IdenticalPathPage.module.scss';
+
+
 type IdenticalPathAlertProps = {
   path? : string | null,
 }
@@ -67,7 +70,7 @@ export const IdenticalPathPage = (): JSX.Element => {
     <div className="d-flex flex-column flex-lg-row-reverse">
 
       <div className="grw-side-contents-container">
-        <div className="grw-page-accessories-control pb-1">
+        <div className={`pb-1 grw-page-accessories-control ${styles['grw-page-accessories-control']}`}>
           { currentPath != null && !isSharedUser && (
             <button
               type="button"

+ 5 - 0
packages/app/src/components/Page/DisplaySwitcher.module.scss

@@ -0,0 +1,5 @@
+@use '~/styles/molecules/page-accessories-control';
+
+.grw-page-accessories-control :global {
+  @extend %grw-page-accessories-control;
+}

+ 5 - 2
packages/app/src/components/Page/DisplaySwitcher.tsx

@@ -22,6 +22,9 @@ import TableOfContents from '../TableOfContents';
 import UserInfo from '../User/UserInfo';
 
 
+import styles from './DisplaySwitcher.module.scss';
+
+
 const WIKI_HEADER_LINK = 120;
 
 const { isTopPage } = pagePathUtils;
@@ -75,7 +78,7 @@ const DisplaySwitcher = (): JSX.Element => {
                 <div className="grw-side-contents-sticky-container">
 
                   {/* Page list */}
-                  <div className="grw-page-accessories-control">
+                  <div className={`grw-page-accessories-control ${styles['grw-page-accessories-control']}`}>
                     { currentPagePath != null && !isSharedUser && (
                       <button
                         type="button"
@@ -95,7 +98,7 @@ const DisplaySwitcher = (): JSX.Element => {
                   {/* Comments */}
                   {/* { getCommentListDom != null && !isTopPagePath && ( */}
                   { !isTopPagePath && (
-                    <div className="grw-page-accessories-control mt-2">
+                    <div className={`mt-2 grw-page-accessories-control ${styles['grw-page-accessories-control']}`}>
                       <button
                         type="button"
                         className="btn btn-block btn-outline-secondary grw-btn-page-accessories rounded-pill d-flex justify-content-between align-items-center"

+ 1 - 1
packages/app/src/styles/_page-accessories-control.scss → packages/app/src/styles/molecules/_page-accessories-control.scss

@@ -1,4 +1,4 @@
-.grw-page-accessories-control {
+%grw-page-accessories-control {
   .grw-btn-page-accessories {
     padding-right: 1rem;
     padding-left: 1rem;