JSPM

day-night-switch

1.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q19848F
  • License MIT

一个白天夜晚样式切换的组件,基于react封装。 A component for switching between day and night themes, encapsulated based on React. 源码:https://github.com/Xiumuzaidiao/Day-night-toggle-button

Package Exports

  • day-night-switch
  • day-night-switch/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (day-night-switch) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

day-night-switch

一个白天夜晚样式切换的组件,基于react封装。 源码:https://github.com/Xiumuzaidiao/Day-night-toggle-button

demo

select day select day

关于

组件源码:https://github.com/PiDazhong/day-night-swicth

props

style className value onChange

使用实例

import React, { useState } from 'react';
import DayNightSwitch from 'day-night-switch';

const myComponent = () => {
  const [light, setLight] = useState(true);

  return (
    <DayNightSwitch
      value={light}
      onChange={setLight}
      style={{
        transform: 'scale(0.33)'
      }}
      className="theme-switch"
    />
  )
}