Closed nathonius closed 1 year ago
Re the "good first issue" label, could you possible add some hints please - I'd like to contribute to this, butgot stuck
I had a look at this, and wasn't able to figure out how to update these lines to use setIcon
:
(I mean, what to use instead of button.innerHTML
- I can handle the ternary operator easily)
In another project based on this, I tried doing button.setIcon()
- and got the text displayed... So I must be missing something ...
Note to self: I would also need to work out how to find the built-in icons to match the custom ones currently in use....
So the icons used in this plugin are just default icons from obsidian. I think chevron-up and chevron-down. Should be able to use the gobal setIcon method on the containers for the icons to add them instead of using svg strings.
I add and use a custom icon in my obsidian-trello plugin, if you want an example.
To find built in icons, honestly one of the easiest ways is the icon swapper plugin. It's not its intended purpose but it has a list of all the built in icons in the plugin settings.
setIcon is gobal. You use iirc it's setIcon(parentElement, 'icon-name')
. The order could be swapped I don't remember.
Wow there's a lot of issues with super-cryptic summary lines!
Oops - sorry - wrong issue :-)
No longer applicable.
Can use global
setIcon
to create icons for collapsing, no need for custom icon svg strings.