Skip to content

Commit 90ee928

Browse files
authored
ui: dark mode for installation components fix (#702)
* ui: dark mode for installation component fixed Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> * ui: dark mode for EnterpriseInstallReminder component fixed Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> * ui: fixing margin in installations Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com> --------- Signed-off-by: Kaushik Tak <kaushiktak19@gmail.com>
1 parent e437932 commit 90ee928

File tree

2 files changed

+38
-18
lines changed

2 files changed

+38
-18
lines changed

src/components/EnterpriseInstallReminder.js

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
import React from "react";
22
import Link from "@docusaurus/Link";
3+
import {useColorMode} from "@docusaurus/theme-common";
34

45
export default function EnterpriseInstallReminder() {
6+
const {colorMode} = useColorMode();
7+
const isDark = colorMode === "dark";
8+
9+
const containerStyle = {
10+
padding: "1rem",
11+
border: isDark ? "1px solid #333" : "1px solid #eee",
12+
borderRadius: "10px",
13+
background: isDark ? "#23272f" : "#fff8f5",
14+
margin: "2rem 0",
15+
color: isDark ? "#fff" : "#222",
16+
boxShadow: isDark
17+
? "0 2px 10px rgba(0,0,0,0.6)"
18+
: "0 2px 6px rgba(0, 0, 0, 0.08)",
19+
};
20+
521
return (
622
<div
7-
style={{
8-
padding: "1rem",
9-
border: "1px solid #eee",
10-
borderRadius: "10px",
11-
background: "#fff8f5",
12-
margin: "2rem 0",
13-
}}
23+
style={containerStyle}
1424
>
15-
<h3>Don’t have Keploy installed yet?</h3>
16-
<p>
25+
<h3 style={{marginTop: 0, color: isDark ? "#fff" : "#222"}}>Don’t have Keploy installed yet?</h3>
26+
<p style={{color: isDark ? "#ccc" : undefined}}>
1727
Before running this sample, make sure Keploy Enterprise version is
1828
installed on your system.
1929
</p>

src/components/InstallReminder.js

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
import React from "react";
22
import Link from "@docusaurus/Link";
3+
import {useColorMode} from "@docusaurus/theme-common";
34

45
export default function InstallReminder() {
6+
const {colorMode} = useColorMode();
7+
const isDark = colorMode === "dark";
8+
9+
const containerStyle = {
10+
padding: "1rem",
11+
border: isDark ? "1px solid #333" : "1px solid #eee",
12+
borderRadius: "10px",
13+
background: isDark ? "#23272f" : "#fff8f5",
14+
margin: "2rem 0",
15+
color: isDark ? "#fff" : "#222",
16+
boxShadow: isDark
17+
? "0 2px 10px rgba(0,0,0,0.6)"
18+
: "0 2px 6px rgba(0, 0, 0, 0.08)",
19+
};
20+
521
return (
622
<div
7-
style={{
8-
padding: "1rem",
9-
border: "1px solid #eee",
10-
borderRadius: "10px",
11-
background: "#fff8f5",
12-
margin: "2rem 0",
13-
}}
23+
style={containerStyle}
1424
>
15-
<h3>Don’t have Keploy installed yet?</h3>
16-
<p>
25+
<h3 style={{marginTop: 0, color: isDark ? "#fff" : "#222"}}>Don’t have Keploy installed yet?</h3>
26+
<p style={{color: isDark ? "#ccc" : undefined}}>
1727
Before running this sample, make sure Keploy is installed on your
1828
system.
1929
</p>

0 commit comments

Comments
 (0)