We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const SwitchMode = props => { const [type, setType] = useState<string>('drak') const switchMode = () => { const body = document.body; if (body.hasAttribute('theme-mode')) { setType('light') body.removeAttribute('theme-mode'); } else { setType('dark') body.setAttribute('theme-mode', 'dark'); } } return ( <div> {type} <Button theme="borderless" icon={type === 'drak' ? <IconSun size="large" /> : <IconMoon size="large" />} style={{ color: 'var(--semi-color-text-2)', marginRight: '12px', }} onClick={switchMode} /> </div> ); }
The text was updated successfully, but these errors were encountered:
拼写错误
Sorry, something went wrong.
No branches or pull requests
Which Component 出现bug的组件
semi-ui version
Expected result 期望的结果是什么
Actual result 实际的结果是什么
Steps to reproduce 复现步骤
Reproducible code 复现代码
Additional information 补充说明
The text was updated successfully, but these errors were encountered: