File tree 3 files changed +78
-33
lines changed
3 files changed +78
-33
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import DefaultAdmonitionTypes from '@theme-original/Admonition/Types' ;
3
3
import BusinessIcon from '@mui/icons-material/Business' ;
4
+ import { useColorMode } from '@docusaurus/theme-common' ;
4
5
5
- import './types.css' ;
6
+ // import './types.css';
7
+ import styles from './types.module.css' ;
6
8
7
9
function EnterpriseAdmonition ( props ) {
10
+ const { colorMode} = useColorMode ( ) ;
11
+
8
12
return (
9
- < div className = "custom_admonition" >
10
- < div className = "custom_admonition_header" >
11
- < span > < BusinessIcon style = { { color : 'rgb(86 83 83)' } } /> </ span >
12
- < h5 > { props . title } </ h5 >
13
+ < div className = {
14
+ colorMode === 'dark'
15
+ ? styles . custom_admonition_dark_mode
16
+ : styles . custom_admonition_light_mode
17
+ }
18
+ >
19
+ < div className = { styles . custom_admonition_header } >
20
+ < span > < BusinessIcon style = {
21
+ colorMode === 'dark'
22
+ ? { color : '#ECE5FF' }
23
+ : { color : 'rgb(86 83 83)' }
24
+ } /> </ span >
25
+ < h5 className = {
26
+ colorMode === 'dark'
27
+ ? styles . custom_admonition_title_dark_mode
28
+ : styles . custom_admonition_title_light_mode
29
+ } > { props . title } </ h5 >
13
30
</ div >
14
- < div className = "custom_admonition_text" >
31
+ < div className = {
32
+ colorMode === 'dark'
33
+ ? styles . custom_admonition_text_dark_mode
34
+ : styles . custom_admonition_text
35
+ } >
15
36
< p > { props . children } </ p >
16
37
</ div >
17
38
</ div >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ .custom_admonition_light_mode {
2
+ border : # ededed 1px solid;
3
+ border-left : # 6F43E7 solid 4px ;
4
+ border-radius : 10px ;
5
+ margin : 0 0 16px 0 ;
6
+ padding : 16px ;
7
+ background-color : # f6f3ff ;
8
+ }
9
+
10
+ .custom_admonition_dark_mode {
11
+ border : # 612fea 1px solid;
12
+ border-left : # e6bffa solid 4px ;
13
+ border-radius : 10px ;
14
+ margin : 0 0 16px 0 ;
15
+ padding : 16px ;
16
+ background-color : # 7161ef ;
17
+ }
18
+
19
+ .custom_admonition_header {
20
+ display : flex;
21
+ justify-content : flex-start;
22
+ }
23
+
24
+ .custom_admonition_header span {
25
+ margin-right : 5px ;
26
+ }
27
+
28
+ .custom_admonition_title_light_mode {
29
+ color : # 6F43E7 ;
30
+ font-size : 16px ;
31
+ }
32
+
33
+ .custom_admonition_title_dark_mode {
34
+ color : # ECE5FF ;
35
+ font-size : 16px ;
36
+ }
37
+
38
+ .custom_admonition_text p {
39
+ margin : 0 0 0 0 ;
40
+ font-size : 16px ;
41
+ }
42
+
43
+ .custom_admonition_text_dark_mode p {
44
+ margin : 0 0 0 0 ;
45
+ font-size : 16px ;
46
+ }
47
+
48
+ .custom_admonition_text_dark_mode a {
49
+ color : # f1e8f9 ;
50
+ font-weight : bold;
51
+ }
You can’t perform that action at this time.
0 commit comments