Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(doc-e2e): add doc-tools e2e #3472

Merged
merged 2 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/curvy-ducks-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@modern-js/doc-core': patch
---

feat: add doc-tools e2e
sanyuan0704 marked this conversation as resolved.
Show resolved Hide resolved

feat: 添加 doc-tools e2e 测试用例
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,11 @@ export function SideBar(props: Props) {
}
};
return (
<aside className={`${styles.sidebar} ${isSidebarOpen ? styles.open : ''}`}>
<aside
className={`${styles.sidebar} modern-sidebar ${
isSidebarOpen ? styles.open : ''
}`}
>
<div className={`mt-1 ${styles.sidebarContent}`}>
<div
className="modern-scrollbar"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ export function SwitchAppearance({ onClick }: { onClick?: () => void }) {

useEffect(() => {
if (isDarkMode()) {
setTheme!('dark');
setTheme('dark');
}
}, []);

return (
<div
onClick={() => {
setTheme!(theme === 'dark' ? 'light' : 'dark');
setTheme(theme === 'dark' ? 'light' : 'dark');
toggleAppearance();
onClick?.();
}}
className="mr-2"
className="mr-2 modern-nav-appearance"
>
<div className="p-1 border border-solid border-gray-300 text-gray-400 cursor-pointer rounded-md hover:border-gray-600 hover:text-gray-600 dark:hover:border-gray-200 dark:hover:text-gray-200 transition-all duration-300">
{theme === 'light' ? (
Expand Down
Loading
Loading