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
import React from 'react' import ReactDOM from 'react-dom' import { Switch, Button, ISwitchProps } from '@kdcloudjs/kdesign' const Demo: React.FC = () => { const [checked, setChecked] = React.useState < ISwitchProps['checked'] > true const [loading, setLoading] = React.useState < ISwitchProps['loading'] > false const toggle: ISwitchProps['onClick'] = () => { setChecked(!checked) } const toggleToLoading: ISwitchProps['onClick'] = () => { setLoading(!loading) } const onChange: ISwitchProps['onChange'] = (checked) => { console.log(`switch to ${checked}`) } return ( <> <br /> <Switch checked={checked} defaultChecked onChange={onChange} /> <br /> <Button type="primary" onClick={toggle}> Toggle </Button> <br /> <Switch loading={loading} checked={checked} defaultChecked onChange={onChange} /> <br /> <Button type="primary" onClick={toggleToLoading}> Toggle to loading </Button> </> ) } ReactDOM.render(<Demo />, mountNode)
1.可访问组件的Props类型 2.组件demo中有完整的typescript定义
1.无法访问组件的Props类型 2.组件demo中没有完整的typescript定义
组件库与浏览器均为最新版本
The text was updated successfully, but these errors were encountered:
fix: [Switch] 修复@kdcloudjs/kdesign中未导出ISwitch选项 #963
e67d1ed
hidden7123
No branches or pull requests
重现链接或代码
重现问题步骤
期望的结果是什么
1.可访问组件的Props类型
2.组件demo中有完整的typescript定义
实际的结果是什么
1.无法访问组件的Props类型
2.组件demo中没有完整的typescript定义
组件库版本号、浏览器信息
组件库与浏览器均为最新版本
The text was updated successfully, but these errors were encountered: