shd-react-day-night-switch
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

React component - Day night switch from tik-tok

example

"peerDependencies": {
    "react": "*",
    "react-dom": "*",
    "styled-components": "*"
},

How use

import React, { useState } from 'react'
import DayNightSwitch from "@shd/react-day-night-switch";

const App = () => {
  const [isDarkMode, setIsDarkMode] = useState(false)

  return (
    <DayNightSwitch
      onChange={() => setIsDarkMode(!isDarkMode)}
      checked={isDarkMode}
    />
  )
}

day

night

Package Sidebar

Install

npm i shd-react-day-night-switch

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

30.6 kB

Total Files

26

Last publish

Collaborators

  • dmitrii-shap