Add foundational components and logic for migration, UI design, and input handling
- Introduced foundational UI components (`Badge`, `LockCard`, `SectionHeader`, `AvatarIcon`, etc.) for flexible layouts and consistent design. - Added migration support with the `MigrationModal` component and backend integration for exporting/importing data between Electron and Tauri. - Extended form components with `TextAreaInput`, `OrderInput`, `ToggleField`, and `ToolbarSelect` for improved input handling. - Updated `ScribeShell` with migration popup logic to prompt users for data migration. - Integrated `AlertStack` for better alert handling and notification management. - Enhanced Rust/Tauri services with migration command implementations. - Added translations and styles for new components.
This commit is contained in:
14
context/ThemeContext.ts
Normal file
14
context/ThemeContext.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import {Context, createContext} from "react";
|
||||
|
||||
export type SupportedTheme = 'dark' | 'light';
|
||||
|
||||
export interface ThemeContextProps {
|
||||
theme: SupportedTheme;
|
||||
setTheme: (theme: SupportedTheme) => void;
|
||||
}
|
||||
|
||||
export const ThemeContext: Context<ThemeContextProps> = createContext<ThemeContextProps>({
|
||||
theme: 'dark',
|
||||
setTheme: (): void => {
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user