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

Commit

Permalink
fix: styles do not match the dark mode color
Browse files Browse the repository at this point in the history
  • Loading branch information
wibus-wee committed Oct 29, 2023
1 parent ed186f9 commit f225759
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions components/EnvVariableConfig/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function EnvVariableConfig({ variableNames }) {
<div key={`${name.key}`} className="flex items-center space-x-4 mb-4">
<input
type="text"
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"
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"
value={name.name || name.key}
data-tip={name.key}
onMouseOver={(e: any) => {
Expand All @@ -43,7 +43,7 @@ export function EnvVariableConfig({ variableNames }) {
<input
type="text"
// :focus-visible outline none
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" }}
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" }}
placeholder={`Enter value...`}
value={values[index]}
onChange={(e) => handleChange(index, e.target.value)}
Expand All @@ -54,7 +54,7 @@ export function EnvVariableConfig({ variableNames }) {
<h2 className="sr-only">环境变量配置</h2>
<button
type="button"
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"
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"
onClick={handleCopy}
>
复制
Expand Down
18 changes: 9 additions & 9 deletions pages/docs/advanced.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ export const Configurator = ({ args, template, env }) => {
<div>
<div className="p-4 mt-2">

<div id="config" className="border rounded-lg overflow-hidden h-12 mb-4" style={{
<div id="config" className="border rounded-lg overflow-hidden h-12 mb-4 dark:border-gray-700 " style={{
height: "66.4px",
transition: 'height 0.5s ease-in-out',
}}>
<div className="flex cursor-pointer items-center justify-between bg-gray-100 p-4" onClick={() => {
<div className="flex cursor-pointer items-center justify-between bg-gray-100 p-4 dark:bg-gray-700" onClick={() => {
const config = document.getElementById('config');
const h12Exist = config.classList.contains('h-12'); // 12 在那就是未展开, auto 就是展开
if (!h12Exist) {
Expand All @@ -184,8 +184,8 @@ export const Configurator = ({ args, template, env }) => {
config.classList.remove('h-12');
}
}}>
<h2 className="text-sm text-gray-500">
<span className="text-black">ecosystem.config.js</span> 配置文件 (点击展开)
<h2 className="text-sm text-gray-500 dark:text-gray-300">
<span className="text-black dark:text-gray-300">ecosystem.config.js</span> 配置文件 (点击展开)
</h2>
<button
type="button"
Expand Down Expand Up @@ -221,13 +221,13 @@ export const Configurator = ({ args, template, env }) => {
<div key={key} className="flex items-center space-x-4 mb-4">
<input
type="text"
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"
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"
value={`${key} (${env[key].tip})`}
disabled
/>
<input
type={env[key].type}
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" }}
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" }}
placeholder={`Enter value...`}
value={envValues[Object.keys(env).indexOf(key)]}
onChange={(e) => handleChange(index, e.target.value)}
Expand All @@ -240,8 +240,8 @@ export const Configurator = ({ args, template, env }) => {
{args.map((arg) => (
<button
key={arg}
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 ${
selectedArgs.includes(arg) ? 'bg-gray-200' : 'bg-transparent'
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 ${
selectedArgs.includes(arg) ? 'bg-gray-200 dark:bg-gray-800' : 'bg-transparent'
}`}
onClick={() => handleToggleArg(arg)}
>
Expand All @@ -253,7 +253,7 @@ export const Configurator = ({ args, template, env }) => {

<button
type="button"
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"
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 "
onClick={handleCopyToClipboard}
>
复制
Expand Down

0 comments on commit f225759

Please sign in to comment.