import React, { Component } from 'react'; import { SketchPicker } from 'react-color'; import classNames from 'classnames'; import { SettingOutlined } from '@ant-design/icons'; class ThemePicker extends Component { state = { switcherOn: false, background: localStorage.getItem('@primary-color') || '#313653', }; _switcherOn = () => { this.setState({ switcherOn: !this.state.switcherOn, }); }; _handleChangeComplete = (color: any) => { console.log(color); this.setState({ background: color.hex }); localStorage.setItem('@primary-color', color.hex); (window as any).less.modifyVars({ '@primary-color': color.hex, }); }; render() { const { switcherOn, background } = this.state; return (