Add tooltips to buttons (#637)

* Add tooltips

* Fix whitespace

* Avoid overloaded word canvas

* Clean render function

* Switch folder to fragment
This commit is contained in:
boatbomber
2022-10-07 19:31:14 -04:00
committed by GitHub
parent 96cb1ee3fd
commit b88d34c639
10 changed files with 354 additions and 89 deletions

View File

@@ -10,6 +10,7 @@ local Theme = require(Plugin.App.Theme)
local bindingUtil = require(Plugin.App.bindingUtil)
local SlicedImage = require(script.Parent.SlicedImage)
local Tooltip = require(script.Parent.Tooltip)
local e = Roact.createElement
@@ -52,6 +53,10 @@ function Checkbox:render()
[Roact.Event.Activated] = self.props.onClick,
}, {
StateTip = e(Tooltip.Trigger, {
text = if self.props.active then "Enabled" else "Disabled",
}),
Active = e(SlicedImage, {
slice = Assets.Slices.RoundedBackground,
color = theme.Active.BackgroundColor,