import React, { memo, FC, useState, useContext } from 'react'; import Broadcast from '@/components/svgIcon'; import Switch from '@/components/switch'; import { FlowContext } from '@/core/context'; import { il8n } from '@/language'; import { defaultLanguage } from '@/core/config'; import './index.scss'; export interface SetType { switchChange: Function; style?: React.CSSProperties; } const Set: FC = memo(function Set({ switchChange, style }) { const reviceProps = useContext(FlowContext); const { theme, language } = reviceProps.propsAttributes!; const [isShow, setIsShow] = useState(false); return (
[setIsShow(true), e.stopPropagation()]} onMouseLeave={(e) => [setIsShow(false)]} style={style} >
  • switchChange(e, 'lights')} theme={theme} />
  • switchChange(e, 'loop')} />
); }); export default Set;