mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-22 05:35:10 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user