Class: Flowbite::Badge::Pill
- Inherits:
-
Flowbite::Badge
- Object
- ViewComponent::Base
- Flowbite::Badge
- Flowbite::Badge::Pill
- Defined in:
- app/components/flowbite/badge/pill.rb
Overview
Renders a pill-shaped badge with fully rounded corners.
Constant Summary
Constants inherited from Flowbite::Badge
Instance Attribute Summary
Attributes inherited from Flowbite::Badge
Class Method Summary collapse
-
.styles ⇒ Object
rubocop:disable Layout/LineLength.
Methods inherited from Flowbite::Badge
#bordered?, classes, #dot?, #initialize, #link?, sizes
Constructor Details
This class inherits a constructor from Flowbite::Badge
Class Method Details
.styles ⇒ Object
rubocop:disable Layout/LineLength
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/components/flowbite/badge/pill.rb', line 14 def styles Flowbite::Styles.from_hash({ alternative: { default: ["bg-neutral-primary-soft", "hover:bg-neutral-secondary-medium", "rounded-full", "text-heading"] }, brand: { default: ["bg-brand-softer", "hover:bg-brand-soft", "rounded-full", "text-fg-brand-strong"] }, danger: { default: ["bg-danger-soft", "hover:bg-danger-medium", "rounded-full", "text-fg-danger-strong"] }, gray: { default: ["bg-neutral-secondary-medium", "hover:bg-neutral-tertiary-medium", "rounded-full", "text-heading"] }, success: { default: ["bg-success-soft", "hover:bg-success-medium", "rounded-full", "text-fg-success-strong"] }, warning: { default: ["bg-warning-soft", "hover:bg-warning-medium", "rounded-full", "text-fg-warning"] } }.freeze) end |