mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 03:36:06 +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:
parent
96cb1ee3fd
commit
b88d34c639
10 changed files with 354 additions and 89 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue