Skip to content
This repository was archived by the owner on Nov 2, 2024. It is now read-only.

Commit f225759

Browse files
committed
fix: styles do not match the dark mode color
1 parent ed186f9 commit f225759

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

components/EnvVariableConfig/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function EnvVariableConfig({ variableNames }) {
2121
<div key={`${name.key}`} className="flex items-center space-x-4 mb-4">
2222
<input
2323
type="text"
24-
className="border rounded px-2 py-2 w-1/2 bg-transparent focus:outline-none focus:border-black hover:border-white-400 transition duration-300 font-[400] font-sans text-sm cursor-not-allowed"
24+
className="border rounded px-2 py-2 w-1/2 bg-transparent focus:outline-none focus:border-black hover:border-white-400 transition duration-300 font-[400] font-sans text-sm cursor-not-allowed dark:border-gray-700 dark:text-gray-300"
2525
value={name.name || name.key}
2626
data-tip={name.key}
2727
onMouseOver={(e: any) => {
@@ -43,7 +43,7 @@ export function EnvVariableConfig({ variableNames }) {
4343
<input
4444
type="text"
4545
// :focus-visible outline none
46-
className="border rounded px-2 py-2 w-1/2 focus:outline-none focus:border-black hover:border-gray-400 transition duration-300 font-[400] font-sans text-sm" style={{ outline: "none", boxShadow: "none" }}
46+
className="border rounded px-2 py-2 w-1/2 focus:outline-none focus:border-black hover:border-gray-400 transition duration-300 font-[400] font-sans text-sm dark:border-gray-700 dark:text-gray-300" style={{ outline: "none", boxShadow: "none" }}
4747
placeholder={`Enter value...`}
4848
value={values[index]}
4949
onChange={(e) => handleChange(index, e.target.value)}
@@ -54,7 +54,7 @@ export function EnvVariableConfig({ variableNames }) {
5454
<h2 className="sr-only">环境变量配置</h2>
5555
<button
5656
type="button"
57-
className="border bg-black w-full text-white px-4 py-2 rounded-lg text-sm transform transition-all duration-300 focus:outline-none hover:bg-gray-700"
57+
className="border bg-black w-full text-white px-4 py-2 rounded-lg text-sm transform transition-all duration-300 focus:outline-none hover:bg-gray-700 dark:border-gray-700 dark:text-gray-300"
5858
onClick={handleCopy}
5959
>
6060
复制

pages/docs/advanced.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ export const Configurator = ({ args, template, env }) => {
153153
<div>
154154
<div className="p-4 mt-2">
155155

156-
<div id="config" className="border rounded-lg overflow-hidden h-12 mb-4" style={{
156+
<div id="config" className="border rounded-lg overflow-hidden h-12 mb-4 dark:border-gray-700 " style={{
157157
height: "66.4px",
158158
transition: 'height 0.5s ease-in-out',
159159
}}>
160-
<div className="flex cursor-pointer items-center justify-between bg-gray-100 p-4" onClick={() => {
160+
<div className="flex cursor-pointer items-center justify-between bg-gray-100 p-4 dark:bg-gray-700" onClick={() => {
161161
const config = document.getElementById('config');
162162
const h12Exist = config.classList.contains('h-12'); // 12 在那就是未展开, auto 就是展开
163163
if (!h12Exist) {
@@ -184,8 +184,8 @@ export const Configurator = ({ args, template, env }) => {
184184
config.classList.remove('h-12');
185185
}
186186
}}>
187-
<h2 className="text-sm text-gray-500">
188-
<span className="text-black">ecosystem.config.js</span> 配置文件 (点击展开)
187+
<h2 className="text-sm text-gray-500 dark:text-gray-300">
188+
<span className="text-black dark:text-gray-300">ecosystem.config.js</span> 配置文件 (点击展开)
189189
</h2>
190190
<button
191191
type="button"
@@ -221,13 +221,13 @@ export const Configurator = ({ args, template, env }) => {
221221
<div key={key} className="flex items-center space-x-4 mb-4">
222222
<input
223223
type="text"
224-
className="border rounded px-2 py-2 w-1/2 bg-transparent focus:outline-none focus:border-black hover:border-white-400 transition duration-300 font-[400] font-sans text-sm cursor-not-allowed"
224+
className="border rounded px-2 py-2 w-1/2 bg-transparent focus:outline-none focus:border-black hover:border-white-400 transition duration-300 font-[400] font-sans text-sm cursor-not-allowed dark:border-gray-700 dark:text-gray-300"
225225
value={`${key} (${env[key].tip})`}
226226
disabled
227227
/>
228228
<input
229229
type={env[key].type}
230-
className="border rounded px-2 py-2 w-1/2 focus:outline-none focus:border-black hover:border-gray-400 transition duration-300 font-[400] font-sans text-sm" style={{ outline: "none", boxShadow: "none" }}
230+
className="border rounded px-2 py-2 w-1/2 focus:outline-none focus:border-black hover:border-gray-400 transition duration-300 font-[400] font-sans text-sm dark:border-gray-700 dark:text-gray-300" style={{ outline: "none", boxShadow: "none" }}
231231
placeholder={`Enter value...`}
232232
value={envValues[Object.keys(env).indexOf(key)]}
233233
onChange={(e) => handleChange(index, e.target.value)}
@@ -240,8 +240,8 @@ export const Configurator = ({ args, template, env }) => {
240240
{args.map((arg) => (
241241
<button
242242
key={arg}
243-
className={`border rounded px-2 py-2 mr-4 mb-4 focus:outline-none focus:border-black hover:border-gray-400 transition duration-300 font-[400] font-sans text-sm ${
244-
selectedArgs.includes(arg) ? 'bg-gray-200' : 'bg-transparent'
243+
className={`border rounded px-2 py-2 mr-4 mb-4 focus:outline-none focus:border-black hover:border-gray-400 transition duration-300 font-[400] font-sans text-sm dark:border-gray-700 dark:text-gray-300 ${
244+
selectedArgs.includes(arg) ? 'bg-gray-200 dark:bg-gray-800' : 'bg-transparent'
245245
}`}
246246
onClick={() => handleToggleArg(arg)}
247247
>
@@ -253,7 +253,7 @@ export const Configurator = ({ args, template, env }) => {
253253

254254
<button
255255
type="button"
256-
className="border bg-black w-full text-white px-4 py-2 rounded-lg text-sm transform transition-all duration-300 focus:outline-none hover:bg-gray-700"
256+
className="border bg-black w-full text-white px-4 py-2 rounded-lg text-sm transform transition-all duration-300 focus:outline-none hover:bg-gray-700 dark:border-gray-700 dark:text-gray-300 "
257257
onClick={handleCopyToClipboard}
258258
>
259259
复制

0 commit comments

Comments
 (0)