Skip to content

Commit

Permalink
Store LoadingWidget message in a local variable for easy reference
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Jan 8, 2025
1 parent 94f9d8d commit d05a863
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/aiidalab_qe/common/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,9 +961,10 @@ class LoadingWidget(ipw.HBox):
"""Widget for displaying a loading spinner."""

def __init__(self, message="Loading", **kwargs):
self.message = ipw.Label(message)
super().__init__(
children=[
ipw.Label(message),
self.message,
ipw.HTML("<i class='fa fa-spinner fa-spin fa-2x fa-fw'/>"),
],
**kwargs,
Expand Down

0 comments on commit d05a863

Please sign in to comment.