Sha256: fcd1fb961510436399bcde370875dade1c01cd19ff80bbbfb4cf9b9270c61f65

Contents?: true

Size: 750 Bytes

Versions: 201

Compression:

Stored size: 750 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbDateYearStacked
    class DateYearStacked
      include Playbook::Props

      partial "pb_date_year_stacked/date_year_stacked"

      prop :align, type: Playbook::Props::Enum,
                   values: %w[left center right],
                   default: "left"
      prop :dark, type: Playbook::Props::Boolean,
                  default: false
      prop :date

      def year
        as_date.to_year
      end

      def day_month
        "#{as_date.to_day.strip} #{as_date.to_month}"
      end

      def classname
        generate_classname("pb_date_year_stacked", align)
      end

    private

      def as_date
        Playbook::PbKit::PbDateTime.new(date)
      end
    end
  end
end

Version data entries

201 entries across 201 versions & 1 rubygems

Version Path
playbook_ui-7.7.0 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.6.2.pre.alpha1 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.6.2 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.6.1.pre.alpha1 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.6.1 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.6.0 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.5.1 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.5.0 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.4.2 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.4.1 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.4.0.pre.alpha6 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.4.0.pre.alpha5 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.4.0 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.4.0.pre.test4 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.4.0.pre.test3 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.4.0.pre.test2 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.4.0.pre.alpha4 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.4.0.pre.alpha2 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.4.0.pre.alpha1 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
playbook_ui-7.3.0.pre.alpha12 app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb