import * as React from 'react'; import ReactSwitch from 'react-switch'; import { State } from '$src/store/types'; import { getTheme } from '../store/app'; import { connect } from './StateProvider'; // workaround https://github.com/vitejs/vite/issues/2139#issuecomment-802981228 // @ts-ignore const Switch = ReactSwitch.default ? ReactSwitch.default : ReactSwitch; function SwitchThemed({ checked = false, onChange, theme, name }) { const offColor = theme === 'dark' ? '#393939' : '#e9e9e9'; return ( ); } export default connect((s: State) => ({ theme: getTheme(s) }))(SwitchThemed);