Sha256: a71bbcc2c199f6c230fb7a8d847efe7b91db4ffb51671838cff3f89430d437ca

Contents?: true

Size: 850 Bytes

Versions: 2

Compression:

Stored size: 850 Bytes

Contents

require "tailwind_merge"

module ComponentsHelper
  def tw(classes)
    TailwindMerge::Merger.new.merge(classes)
  end

  PRIMARY_CLASSES = " bg-primary text-primary-foreground hover:bg-primary/80 "
  SECONDARY_CLASSES = " bg-secondary text-secondary-foreground hover:bg-secondary/80 "
  OUTLINE_CLASSES = "  border border-input bg-background hover:bg-accent hover:text-accent-foreground "
  GHOST_CLASSES = " hover:bg-accent hover:text-accent-foreground  "
  DESTRUCTIVE_CLASSES = " bg-destructive text-destructive-foreground hover:bg-destructive/90 "

  module Button
    PRIMARY = ComponentsHelper::PRIMARY_CLASSES
    SECONDARY = ComponentsHelper::SECONDARY_CLASSES
    OUTLINE = ComponentsHelper::OUTLINE_CLASSES
    GHOST = ComponentsHelper::GHOST_CLASSES
    DESTRUCTIVE = ComponentsHelper::DESTRUCTIVE_CLASSES
  end

  module Alert
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shadcn-ui-0.0.10 app/helpers/components_helper.rb
shadcn-ui-0.0.8 app/helpers/components_helper.rb