mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-29 06:29:03 +02:00
refactor(theme-classic): replace color mode toggle with button; remove switchConfig (#6771)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
b1492135c2
commit
7ec44bb32c
15 changed files with 282 additions and 356 deletions
|
@ -6,8 +6,8 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import OriginalToggle from '@theme-original/Toggle';
|
||||
import type {Props} from '@theme/Toggle';
|
||||
import OriginalToggle from '@theme-original/ColorModeToggle';
|
||||
import type {Props} from '@theme/ColorModeToggle';
|
||||
import {
|
||||
lightStorage,
|
||||
darkStorage,
|
||||
|
@ -24,7 +24,7 @@ import {
|
|||
// session storage, and we need to apply the same style when toggling modes even
|
||||
// when we are not on the styling-layout page. The only way to do this so far is
|
||||
// by hooking into the Toggle component.
|
||||
export default function Toggle(props: Props): JSX.Element {
|
||||
export default function ColorModeToggle(props: Props): JSX.Element {
|
||||
return (
|
||||
<OriginalToggle
|
||||
{...props}
|
Loading…
Add table
Add a link
Reference in a new issue