Explorar el Código

create tag lables style module

yuken hace 3 años
padre
commit
bdf8e73b54

+ 9 - 0
packages/app/src/components/Page/TagLabels.module.scss

@@ -0,0 +1,9 @@
+@use '~/styles/bootstrap/init' as bs;
+
+.grw-tag-labels :global {
+  .grw-tag-label {
+    font-size: 12px;
+    font-weight: normal;
+    border-radius: bs.$border-radius;
+  }
+}

+ 3 - 1
packages/app/src/components/Page/TagLabels.tsx

@@ -3,6 +3,8 @@ import React, { FC, useState } from 'react';
 import RenderTagLabels from './RenderTagLabels';
 import RenderTagLabels from './RenderTagLabels';
 import TagEditModal from './TagEditModal';
 import TagEditModal from './TagEditModal';
 
 
+import styles from './TagLabels.module.scss';
+
 type Props = {
 type Props = {
   tags?: string[],
   tags?: string[],
   isGuestUser: boolean,
   isGuestUser: boolean,
@@ -25,7 +27,7 @@ const TagLabels:FC<Props> = (props: Props) => {
 
 
   return (
   return (
     <>
     <>
-      <form className="grw-tag-labels form-inline">
+      <form className={`${styles['grw-tag-labels']} grw-tag-labels form-inline`}>
         <i className="tag-icon icon-tag mr-2"></i>
         <i className="tag-icon icon-tag mr-2"></i>
         { tags == null
         { tags == null
           ? (
           ? (

+ 3 - 1
packages/app/src/components/Sidebar/RecentChanges.tsx

@@ -17,8 +17,10 @@ import FormattedDistanceDate from '../FormattedDistanceDate';
 
 
 import InfiniteScroll from './InfiniteScroll';
 import InfiniteScroll from './InfiniteScroll';
 
 
+import TagLabelsStyles from '../Page/TagLabels.module.scss';
 import styles from './RecentChanges.module.scss';
 import styles from './RecentChanges.module.scss';
 
 
+
 const logger = loggerFactory('growi:History');
 const logger = loggerFactory('growi:History');
 
 
 type PageItemProps = {
 type PageItemProps = {
@@ -82,7 +84,7 @@ const LargePageItem = memo(({ page }: PageItemProps): JSX.Element => {
             <PagePathHierarchicalLink linkedPagePath={linkedPagePathLatter} basePath={dPagePath.isRoot ? undefined : dPagePath.former} />
             <PagePathHierarchicalLink linkedPagePath={linkedPagePathLatter} basePath={dPagePath.isRoot ? undefined : dPagePath.former} />
             {locked}
             {locked}
           </h5>
           </h5>
-          <div className="grw-tag-labels mt-1 mb-2">
+          <div className={`grw-tag-labels ${TagLabelsStyles['grw-tag-labels']} mt-1 mb-2`}>
             { tagElements }
             { tagElements }
           </div>
           </div>
           <PageItemLower page={page} />
           <PageItemLower page={page} />

+ 0 - 8
packages/app/src/styles/_tag.scss

@@ -6,14 +6,6 @@
   }
   }
 }
 }
 
 
-.grw-tag-labels {
-  .grw-tag-label {
-    font-size: 12px;
-    font-weight: normal;
-    border-radius: bs.$border-radius;
-  }
-}
-
 .grw-popular-tag-labels {
 .grw-popular-tag-labels {
   text-align: left;
   text-align: left;