message: refactor: switch adapt theme
diff: import React, { useState, useCallback, useEffect } from 'react'
  import classNames from 'classnames'
  +import Provider from '../context'
  import './style/index'
  -const Switch = ({
  - content = [],
  - disabled = false,
  - checked,
  - defaultChecked,
  - onChange,
  - onClick
  -}) => {
  +const Switch = ({ content = [], disabled = false, checked, defaultChecked, onChange, onClick, theme }) => {
  const [value, setValue] = useState(checked || defaultChecked || false)
  useEffect(() => {
  @@ -19,7 +13,7 @@ const Switch = ({
  }, [checked])
  const clickSwitch = useCallback(
  - e => {
  + (e) => {
  if (!disabled) {
  if (onClick) {
  onClick(!value, e)
  @@ -39,16 +33,15 @@ const Switch = ({
  <span
  className={classNames(
  'hi-switch',
  + `theme__${theme}`,
  !value && 'hi-switch--closed',
  disabled && 'hi-switch--disabled'
  )}
  onClick={clickSwitch}
  >
  - <span className='hi-switch__text'>
  - {content.length > 0 && (value ? content[0] : content[1])}
  - </span>
  + <span className="hi-switch__text">{content.length > 0 && (value ? content[0] : content[1])}</span>
  </span>
  )
  }
  -export default Switch
  +export default Provider(Switch)
  