-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
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
[feature] replace storybook with react-live #55
base: master
Are you sure you want to change the base?
Conversation
[add] react live [optimize] CodeExample component
[unfinished]
|
render() { | ||
const { showLoading } = this; | ||
|
||
return ( | ||
<> | ||
<Button | ||
onClick={async () => { | ||
this.showLoading = true; | ||
await sleep(1); | ||
this.showLoading = false; | ||
}} | ||
style={{ zIndex: '1040' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
render() { | |
const { showLoading } = this; | |
return ( | |
<> | |
<Button | |
onClick={async () => { | |
this.showLoading = true; | |
await sleep(1); | |
this.showLoading = false; | |
}} | |
style={{ zIndex: '1040' }} | |
toggle = async () => { | |
this.showLoading = true; | |
await sleep(1); | |
this.showLoading = false; | |
}; | |
render() { | |
const { showLoading } = this; | |
return ( | |
<> | |
<Button | |
style={{ zIndex: '1040' }} | |
onClick={this.toggle} |
<> | ||
<Button | ||
onClick={async () => { | ||
this.showLoading = true; | ||
await sleep(1); | ||
this.showLoading = false; | ||
}} | ||
style={{ zIndex: '1040' }} | ||
> | ||
显示 | ||
</Button> | ||
|
||
{showLoading && <Loading>加载中...</Loading>} | ||
</> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
和下面那个组件有啥区别呢?
# This configuration file was automatically generated by Gitpod. | ||
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) | ||
# and commit this file to your remote git repository to share the goodness with others. | ||
|
||
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart | ||
|
||
tasks: | ||
- init: pnpm install && pnpm run build | ||
command: pnpm run start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
复用其它前端脚手架的同名文件内容,设置更详细。
[add] react live
[optimize] CodeExample component