Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: set icon and text as traits in btn #608

Merged
merged 8 commits into from
Nov 22, 2022
Merged

fix: set icon and text as traits in btn #608

merged 8 commits into from
Nov 22, 2022

Conversation

12rambau
Copy link
Member

@12rambau 12rambau commented Nov 18, 2022

Fix #594

Multiple changes:

  • deprecate the "icon" and "text" keyword as they are boolean traits of the ipyvuetify Btn. It's still working as init parameter for the time being
  • use "gliph" and "msg" instead
  • create traits for each one of them
  • observe these traints to update the content of the Btn
from sepal_ui import sepalwidgets as sw 

toto = sw.Btn()
toto
toto.msg = "tata"
toto
toto.gliph = "fas fa-folder"
toto

@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Merging #608 (cb48df3) into main (2d5126f) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #608      +/-   ##
==========================================
+ Coverage   92.20%   92.25%   +0.05%     
==========================================
  Files          36       36              
  Lines        3886     3913      +27     
==========================================
+ Hits         3583     3610      +27     
  Misses        303      303              
Impacted Files Coverage Δ
sepal_ui/sepalwidgets/inputs.py 100.00% <ø> (ø)
sepal_ui/reclassify/reclassify_view.py 84.46% <100.00%> (ø)
sepal_ui/reclassify/table_view.py 59.27% <100.00%> (+0.18%) ⬆️
sepal_ui/sepalwidgets/btn.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@12rambau 12rambau marked this pull request as ready for review November 21, 2022 23:46
@12rambau 12rambau requested a review from dfguerrerom November 21, 2022 23:46
@12rambau 12rambau merged commit b749e3f into main Nov 22, 2022
@12rambau 12rambau deleted the btn branch November 22, 2022 15:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create a function to set the text of the btn dynamically
2 participants