Closed heyvito closed 7 years ago
Cool feature ! haven't thought by myself :D can you style it a little more to match with the rest of the package ? black background with green border and white color should be beautiful :)
I just added a title
property to the buttons; The style is managed by the OS. We can embed a css tooltip framework to customise it, like chinchang/hint.css :)
I can get back on this tonight or tomorrow, and will update this PR asap. :) :+1:
Hey @alanzanattadev! I'm afraid I can't go further on this, since I'm not familiar with React. Using hint.css
interferes with your :before
and :after
declarations for the icons, but I know that Atom has a builtin Tooltip manager, and its documentation is available here. I tried to use it, but I'm not sure how to get the DOM instances of the buttons created by React. I surely can go further on this, if you take some time to explain how to get them. :)
You can get a reference on the button by setting ref={elem => this.buildButton = elem} attribut on the build button for example and then addTooltip(this.buildButton, {title: "my title"} :) the addTooltip must be in componentDidMount method because of the lifecycle of a react component. Don't forget to check if atom API are available in the component to make sure it's reusable. :)
Hey @victorgama ! Have you been able to look into this ?
This is a must-have actually!
This adds tooltips to each interface button, in order to give a tip of what they mean, when hovering them.