Skip to content

Commit

Permalink
feat: add dark mode support with colorScheme prop and useColorScheme …
Browse files Browse the repository at this point in the history
…hook

- Add colorScheme prop to OrbitProvider
- Create useColorScheme hook for theme-aware components
- Add dark mode tokens and styles
- Update Modal and InputField with dark mode support
- Add DarkModeWrapper test utility

Co-Authored-By: Jozef Képesi <[email protected]>
  • Loading branch information
devin-ai-integration[bot] and SScorp committed Dec 12, 2024
1 parent bfd9ad2 commit 1e8156e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/orbit-components/src/test-utils/DarkModeWrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as React from "react";

import { OrbitProvider } from "..";
import defaultTheme from "../defaultTheme";

interface Props {
children: React.ReactNode;
}

export const DarkModeWrapper = ({ children }: Props) => {
return (
<OrbitProvider theme={defaultTheme} useId={React.useId} colorScheme="dark">
{children}
</OrbitProvider>
);
};

export default DarkModeWrapper;

0 comments on commit 1e8156e

Please sign in to comment.