Skip to content

Commit

Permalink
feat: add tooltip support for Input.Toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
meenahoda authored and Meena Brend committed Aug 17, 2022
1 parent 1820643 commit 83949ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/builders/Input.Toggle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const ComponentBuilder = require('./../utils/Component-builder')
const applySpacing = require('./../utils/apply-spacing')
const applySeparator = require('./../utils/apply-separator')
const applyTooltip = require('./../utils/apply-tooltip')
const { inspect } = require('./../utils/local-util')

module.exports = function (definition, options) {
Expand All @@ -11,7 +12,8 @@ module.exports = function (definition, options) {
spacing,
icon,
separator,
style
style,
tooltip
} = definition

const builder = new ComponentBuilder(definition)
Expand Down Expand Up @@ -49,6 +51,10 @@ module.exports = function (definition, options) {

// .addAttribute(':left-label', true)
}

if (tooltip) {
applyTooltip({ source: div, tooltip })
}
}

applySpacing({ spacing, source: div })
Expand Down

0 comments on commit 83949ce

Please sign in to comment.