Browse Source

modify guiderow and change code clearly

mariko-h 1 month ago
parent
commit
b8339c1fd0

+ 1 - 1
apps/app/src/client/components/PageEditor/EditorGuideModal/components/GuideRow.tsx

@@ -52,7 +52,7 @@ export const GuideRow = ({
           style={{ minWidth: isFullWidth ? '100%' : minWidth }}
         >
           <div
-            className={`${styles.codeBox} rounded overflow-hidden position-relative ${isFullWidth ? 'w-100' : ''}`}
+            className={`${styles.codeBox} p-2 ps-2 pe-5 rounded overflow-hidden position-relative ${isFullWidth ? 'w-100' : ''}`}
             style={{ background }}
           >
             <pre

+ 0 - 2
apps/app/src/client/components/PageEditor/EditorGuideModal/contents/TextStyleTab.module.scss

@@ -7,7 +7,6 @@
 
 .codeBlockWrapper {
   width: fit-content;
-  background-color: var(--bs-dark);
 }
 
 .codeContent {
@@ -26,7 +25,6 @@
 }
 
 .inlineCodeLabel {
-  width: fit-content;
   color: var(--bs-pink);
   border: 1px solid var(--bs-pink);
 }

+ 2 - 5
apps/app/src/client/components/PageEditor/EditorGuideModal/contents/TextStyleTab.tsx

@@ -32,11 +32,10 @@ const GuideRow = ({
         <button
           type="button"
           onClick={handleCopy}
-          style={{ cursor: 'pointer' }}
-          className="flex-shrink-0 border-0 p-0 bg-transparent text-start"
+          className="flex-shrink-0 border-0 p-0 bg-transparent text-start cursor-pointer"
         >
           <div
-            className={`p-2 ps-2 pe-5 rounded position-relative ${styles.codeBlockWrapper}`}
+            className={`p-2 ps-2 pe-5 rounded position-relative bg-dark ${styles.codeBlockWrapper}`}
           >
             <pre
               className={`m-0 small font-monospace fw-normal ${styles.codeContent}`}
@@ -174,7 +173,6 @@ export const TextStyleTab: React.FC = () => {
           target="_blank"
           rel="noreferrer"
           className="text-secondary text-decoration-underline"
-          style={{ color: 'var(--bs-secondary-color)' }}
           onClick={(e) => e.stopPropagation()}
         >
           {t(`${i18nKey}.link_growi`)}
@@ -190,7 +188,6 @@ export const TextStyleTab: React.FC = () => {
         <a
           href="/Sandbox"
           className="text-secondary text-decoration-underline"
-          style={{ color: 'var(--bs-secondary-color)' }}
           onClick={(e) => e.stopPropagation()}
         >
           {t(`${i18nKey}.link_sandbox`)}