Skip to content

Commit a67a6dd

Browse files
committed
add descriptions
1 parent 781886b commit a67a6dd

File tree

2 files changed

+35
-4
lines changed

2 files changed

+35
-4
lines changed

src/components/CopyMarkdown.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ function CopyMarkdown() {
209209
onClick={openInChatGpt}
210210
role="menuitem"
211211
>
212-
<span>Open in ChatGPT</span>
212+
<div className={styles.actionContent}>
213+
<span className={styles.actionTitle}>Open in ChatGPT</span>
214+
<span className={styles.actionDescription}>Ask questions about this page</span>
215+
</div>
213216
</button>
214217
</li>
215218
<li className={styles.item}>
@@ -218,7 +221,10 @@ function CopyMarkdown() {
218221
onClick={copyMarkdown}
219222
role="menuitem"
220223
>
221-
<span>Copy Markdown</span>
224+
<div className={styles.actionContent}>
225+
<span className={styles.actionTitle}>Copy Markdown</span>
226+
<span className={styles.actionDescription}>Copy page source to clipboard</span>
227+
</div>
222228
</button>
223229
</li>
224230
<li className={styles.item}>
@@ -227,7 +233,10 @@ function CopyMarkdown() {
227233
onClick={viewAsMarkdown}
228234
role="menuitem"
229235
>
230-
<span>View in Markdown</span>
236+
<div className={styles.actionContent}>
237+
<span className={styles.actionTitle}>View Markdown</span>
238+
<span className={styles.actionDescription}>Open this page in plain text format</span>
239+
</div>
231240
</button>
232241
</li>
233242
</ul>

src/components/CopyMarkdown.module.css

+23-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
.actionButton {
109109
display: flex;
110110
align-items: center;
111-
padding: 0.75rem 1rem;
111+
padding: 0.875rem 1rem;
112112
width: 100%;
113113
text-align: left;
114114
color: var(--ifm-color-gray-800, #444950);
@@ -120,6 +120,24 @@
120120
outline: none;
121121
}
122122

123+
.actionContent {
124+
display: flex;
125+
flex-direction: column;
126+
width: 100%;
127+
}
128+
129+
.actionTitle {
130+
font-size: 1rem;
131+
font-weight: 500;
132+
margin-bottom: 0.25rem;
133+
}
134+
135+
.actionDescription {
136+
font-size: 0.8125rem;
137+
color: var(--ifm-color-gray-600, #606770);
138+
font-weight: 400;
139+
}
140+
123141
.dropdownItemIcon {
124142
width: 16px;
125143
height: 16px;
@@ -189,6 +207,10 @@ html[data-theme='dark'] .actionButton:focus {
189207
color: var(--ifm-color-white, #ffffff);
190208
}
191209

210+
html[data-theme='dark'] .actionDescription {
211+
color: var(--ifm-color-gray-500, #a8acb3);
212+
}
213+
192214
.copied .buttonText {
193215
padding-left: 24px; /* Equal to the width of the copy icon */
194216
padding-right: 27px; /* Equal to the width of the arrow icon plus its margin */

0 commit comments

Comments
 (0)