-
Notifications
You must be signed in to change notification settings - Fork 148
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?
Changes from 2 commits
87af964
b3ef190
e62def3
4f543d8
61a72ef
ca7ada5
3775f62
de7c693
9774107
bc41aec
3d2dba6
de4bf38
5763790
afa721e
47aa8e3
0a954c6
c1db9e5
c878529
5fd3725
c1c5aa0
2c822f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -21,27 +21,26 @@ def Page(): | |||||||||||||||
dense, set_dense = solara.use_state(False) | ||||||||||||||||
outlined, set_outlined = solara.use_state(True) | ||||||||||||||||
text, set_text = solara.use_state(True) | ||||||||||||||||
with solara.VBox() as main: | ||||||||||||||||
with solara.GridFixed(4): | ||||||||||||||||
solara.Checkbox(label="Use icon", value=icon, on_value=set_icon) | ||||||||||||||||
solara.Checkbox(label="Show dense", value=dense, on_value=set_dense) | ||||||||||||||||
solara.Checkbox(label="Show as text", value=text, on_value=set_text) | ||||||||||||||||
solara.Checkbox(label="Show outlined", value=outlined, on_value=set_outlined) | ||||||||||||||||
solara.Warning( | ||||||||||||||||
f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", | ||||||||||||||||
text=text, | ||||||||||||||||
dense=dense, | ||||||||||||||||
outlined=outlined, | ||||||||||||||||
icon=icon, | ||||||||||||||||
) | ||||||||||||||||
solara.Warning( | ||||||||||||||||
f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", | ||||||||||||||||
text=text, | ||||||||||||||||
dense=dense, | ||||||||||||||||
outlined=outlined, | ||||||||||||||||
icon=icon, | ||||||||||||||||
) | ||||||||||||||||
return main | ||||||||||||||||
|
||||||||||||||||
with solara.GridFixed(4): | ||||||||||||||||
solara.Checkbox(label="Use icon", value=icon, on_value=set_icon) | ||||||||||||||||
solara.Checkbox(label="Show dense", value=dense, on_value=set_dense) | ||||||||||||||||
solara.Checkbox(label="Show as text", value=text, on_value=set_text) | ||||||||||||||||
solara.Checkbox(label="Show outlined", value=outlined, on_value=set_outlined) | ||||||||||||||||
solara.Warning( | ||||||||||||||||
f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", | ||||||||||||||||
text=text, | ||||||||||||||||
dense=dense, | ||||||||||||||||
outlined=outlined, | ||||||||||||||||
icon=icon, | ||||||||||||||||
) | ||||||||||||||||
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 commentThe reason will be displayed to describe this comment to others. Learn more. This is duplicate for some reason. Strange that we never noticed.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||||||||||||||||
|
||||||||||||||||
|
||||||||||||||||
__doc__ += apidoc(solara.Warning.f) # type: ignore |
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
withuse_reactive
here.