ui
ui copied to clipboard
It would be great to set text on a button itself
I know you've commented on #99 about the pita that text can be to a library like this, but, when making UI's it is often the case to have a button with text in the button itself or even an icon/font to save space in the UI because labels just take up too much room. Currently, I'll have to use bootstrap and this when making my UI.
It's possible I could help out with this if you like, let me know if that interests you. For the first stab I would probably limit the implementation to just the button and possibly have another button type other than round.
Are you talking about something like the text button? It accepts only text, not icons, but sound similar to what you're imagining.
Wow, not sure how I missed that, but yes, that's what I would like. If icon support was built in that would be great. Maybe something similar to how these handle icons. http://materializecss.com/buttons.html
Poked around a bit at https://github.com/nexus-js/ui/blob/master/lib/interfaces/textbutton.js and it shouldn't be too difficult to implement an icon and alternate icon in the same way text is implemented. Any preferred icon libs, googles icon font? I don't see any contrib guidelines, I can set something up and do a pull request if you are interested.
That would be a welcome contribution, thanks! There is 1 other PR that I should resolve first, in case there is any overlapping code. Will do that as soon as I can and let you know.
Good to hear. Another thing I would like to add is non moveable points to Envelope. I'm building an ADSR editor and traditionally the first and last points are fixed bottom left and right respectively. I think there are a lot of different ways of approaching that one.
for a super cheap text addition on a regular button: https://codepen.io/dirkk0/pen/XWoKLWa