-
Notifications
You must be signed in to change notification settings - Fork 145
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
docs update code warining #901
base: master
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
dense, set_dense = solara.use_state(False) | ||
outlined, set_outlined = solara.use_state(True) | ||
text, set_text = solara.use_state(True) |
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.
We can also replace use_state
with use_reactive
here.
solara.Warning( | ||
f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", | ||
text=text, | ||
dense=dense, | ||
outlined=outlined, | ||
icon=icon, | ||
) |
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 is duplicate for some reason. Strange that we never noticed.
solara.Warning( | |
f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", | |
text=text, | |
dense=dense, | |
outlined=outlined, | |
icon=icon, | |
) |
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.
Thank you. I already fix the two issues, if there is still any problem, please let me know.
for more information, see https://pre-commit.ci
…85/solara into docs_update_code_warining
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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.
I this this style is easier to read, and easier for newcomers
) | ||
|
||
with solara.GridFixed(4): | ||
solara.Checkbox(label="Use icon", value=state.value["icon"], on_value=lambda val: state.value.update({"icon": val})) |
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.
solara.Checkbox(label="Use icon", value=state.value["icon"], on_value=lambda val: state.value.update({"icon": val})) | |
solara.Checkbox(label="Use icon", value=icon) |
icon=icon, | ||
) | ||
return main | ||
state = solara.use_reactive( |
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.
state = solara.use_reactive( | |
icon = solare.use_reactive(True) | |
state = solara.use_reactive( |
cded5b2
to
32af76f
Compare
for more information, see https://pre-commit.ci
…85/solara into docs_update_code_warining
for more information, see https://pre-commit.ci
No description provided.