Theme wrapper component for Mathsy applications
npm install theme-wrapperbash
npm install theme-wrapper
or
yarn add theme-wrapper
`
Usage
`typescript
import ThemeWrapper, { useThemeWrapper } from 'theme-wrapper';
// Using the hook
function MyComponent() {
const { mode, config, toggle } = useThemeWrapper('light');
return (
Current theme: {mode}
);
}
// Using the wrapper component
function App() {
return (
);
}
`
Available Exports
- ThemeWrapper: The main component for wrapping your app with theme support
- useThemeWrapper: A hook for managing theme state and toggling
- ThemeMode: Type definition for theme modes ('light' | 'dark')
Development
1. Clone the repository
2. Install dependencies: yarn install
3. Build the package: yarn build`