1.1.1 • Published 5 years ago

react-theme-switcher v1.1.1

Weekly downloads
19
License
MIT
Repository
github
Last release
5 years ago

React theme switcher component

A react theme switcher component

Installation

# using yarn
yarn add react-theme-switcher

# using npm
npm install react-theme-switcher

Usage

By default theme switcher is applied to body and colors are already setted

import React from "react";
import ThemeSwitcher from "react-theme-switcher";

function App() {
	return (
		<div className="App">
			<header className="App-header">
				<ThemeSwitcher />
				<h2>React theme switcher</h2>
			</header>
		</div>
	);
}

export default App;

Props you can pass to the component:

<ThemeSwitcher
	cssSelector="body"
	switcherColor="#2775cc"
	darkColor="#282c34"
	lightColor="#ffffff"
	lightTextColor="#272b33"
	darkTextColor="#ffffff"
/>

Demo

Preview it on CodeSandbox https://codesandbox.io/s/6yr87ozmkk

Author

Abdessalam BENHARIRA

1.1.1

5 years ago

1.1.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago