class
Opal::UI::Badge
- Opal::UI::Badge
- Opal::UI::Element
- Reference
- Object
Overview
Renders a highlighted tag or pill badge with custom foreground and background colors.
Defined in:
opal/ui/components/badge.crConstructors
Instance Method Summary
- #bg : Color
- #bg=(bg : Color)
- #bold=(bold : Bool)
- #bold? : Bool
- #fg : Color
- #fg=(fg : Color)
- #label : String
- #label=(label : String)
- #preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
- #render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
Instance methods inherited from class Opal::UI::Element
preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
preferred_size,
render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
render
Constructor Detail
def self.new(label : String, bg : Color | Symbol | String = :blue, fg : Color | Symbol | String = :white, bold : Bool = true)
#