UNPKG

@empathyco/x-tailwindcss

Version:
31 lines (27 loc) 1.07 kB
'use strict'; var xDeepMerge = require('@empathyco/x-deep-merge'); var backgroundOnHover = require('./utils/background-on-hover.js'); var noBackground = require('./utils/no-background.js'); /** * Returns the `ghost` variant for component `button`. * * @param helpers - The {@link TailwindHelpers} to generate CSS. * @returns The {@link CssStyleOptions} for the variant. */ function buttonGhost(helpers) { const { theme } = helpers; return { ghost: xDeepMerge.deepMerge(noBackground.noBackground(helpers), backgroundOnHover.backgroundOnHover(helpers), { '&.x-selected': { borderColor: theme('x.colors.neutral.10'), backgroundColor: theme('x.colors.neutral.10'), color: `var(--button-color-75,${theme('x.colors.neutral.90')})`, '&:hover,&:active': { borderColor: theme('x.colors.neutral.25'), backgroundColor: theme('x.colors.neutral.25'), }, }, }), }; } exports.buttonGhost = buttonGhost;