File tree Expand file tree Collapse file tree 5 files changed +34
-6
lines changed Expand file tree Collapse file tree 5 files changed +34
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ export default function DarkMode() {
77 const theme = localStorage . getItem ( 'theme' ) ;
88 const [ dark , setDark ] = useState ( ! ! theme ) ;
99 useEffect ( ( ) => {
10- document . documentElement . dataset . theme = dark ? 'dark' : '' ;
10+ document . documentElement . dataset . theme = dark ? 'dark' : 'light ' ;
1111 } , [ dark ] ) ;
1212 return (
1313 < Switch
Original file line number Diff line number Diff line change 99 width : 100% ;
1010}
1111
12+ html [data- color - mode*= ' dark' ] .warpper {
13+ background-color : #0d1117 ;
14+ border-bottom : 1px solid #032438 ;
15+ }
16+
1217.inner {
1318 margin : 0 auto ;
1419 display : flex ;
1924
2025.menus {
2126 display : flex ;
27+
2228 a {
2329 transition : all 0.3s ;
2430 color : #333 ;
2733 display : flex ;
2834 align-items : center ;
2935 }
36+
3037 a + a {
3138 margin-left : 6px ;
3239 }
40+
3341 :global(.active ),
3442 a :hover {
3543 background : #00000017 ;
4149 display : flex ;
4250 align-items : center ;
4351 color : #333 ;
52+
4453 img {
4554 margin-right : 8px ;
4655 height : 38px ;
5362 line-height : 14px ;
5463 font-weight : bold ;
5564 padding-left : 8px ;
65+
5666 > :first-child {
5767 font-size : 18px ;
5868 }
69+
5970 > :last-child {
6071 margin-bottom : -10px ;
6172 font-size : 12px ;
Original file line number Diff line number Diff line change 11import { Link , NavLink } from 'react-router-dom' ;
22import pkg from '@uiw/react-native/package.json' ;
33import styles from './index.module.less' ;
4- import DarkMode from '../DarkMode ';
4+ import '@wcj/dark-mode ';
55import { ReactComponent } from '../../assets/logo-dark.svg' ;
66import { ReactComponent as Github } from '../../assets/github.svg' ;
77
@@ -43,7 +43,7 @@ export default function Header(props: HeaderProps) {
4343 Web 组件
4444 </ a >
4545 < NavLink to = "/team" > 团队</ NavLink >
46- < DarkMode />
46+ < dark-mode permanent style = { { display : 'flex' , alignItems : 'center' } } />
4747 < a target = "__blank" href = "https://github.com/uiwjs/react-native-uiw" >
4848 < Github />
4949 </ a >
Original file line number Diff line number Diff line change 11.warpper {
22 padding-right : 16px ;
33 position : relative ;
4+
45 a {
56 color : #5a5a5a ;
67 transition : all 0.3s ;
78 margin-left : 10px ;
89 display : flex ;
910 justify-content : space-between ;
1011 padding : 10px 10px 10px 0 ;
12+
1113 svg {
1214 fill : #bbb ;
1315 transition : fill 0.3s ;
1416 }
17+
1518 & :hover {
1619 color : #1890ff ;
20+
1721 svg {
1822 fill : #1890ff ;
1923 }
2024 }
25+
2126 & :global(.active ) {
2227 color : #1890ff ;
2328 background-color : #f5f8fa ;
2429 padding-left : 10px ;
30+
31+ html [data- color - mode*= ' dark' ] & :global {
32+ background-color : #061c31 ;
33+ }
2534 }
2635 }
2736}
5059 top : 60px ;
5160 bottom : 0 ;
5261}
62+
63+ html [data- color - mode*= ' dark' ] .divider {
64+ border-bottom : 1px solid #032438 ;
65+ }
66+
67+ html [data- color - mode*= ' dark' ] .inner {
68+ border-right : 1px solid #032438 ;
69+ }
Original file line number Diff line number Diff line change 1- import { Suspense } from 'react' ;
1+ import { Key , Suspense } from 'react' ;
22import { Routes , Route , Navigate } from 'react-router-dom' ;
33import { Loader } from 'uiw' ;
44import { routeData } from '../routes/router' ;
@@ -16,7 +16,7 @@ export default function Controller() {
1616 < Route path = "/" element = { < Navigate replace to = "/home" /> } />
1717 < Route path = "/docs" element = { < Navigate replace to = "/docs/getting-started" /> } />
1818 < Route path = "/components" element = { < Navigate replace to = "/components/about" /> } />
19- { routeData . map ( ( { component : BasicLayout , path, children = [ ] } , idx ) => (
19+ { routeData . map ( ( { component : BasicLayout , path, children = [ ] } : any , idx ) => (
2020 < Route
2121 path = { path }
2222 key = { idx }
@@ -26,7 +26,7 @@ export default function Controller() {
2626 </ Suspense >
2727 }
2828 >
29- { children . map ( ( child , idx ) => {
29+ { children . map ( ( child : { component : any ; path : string } , idx : Key | null | undefined ) => {
3030 const Child = child . component as any ;
3131 return (
3232 < Route
You can’t perform that action at this time.
0 commit comments