Sha256: d7c74636ee3235e6f74721715001ef75d2b7b63b55dedd757b54032ca43b0ab8
Contents?: true
Size: 710 Bytes
Versions: 11
Compression:
Stored size: 710 Bytes
Contents
# frozen_string_literal: true module Primer # @label TimeAgoComponent class TimeAgoComponentPreview < ViewComponent::Preview # @label Playground # # @param time datetime-local # @param micro [Boolean] toggle def playground(time: Time.zone.now.to_s, micro: false) render(Primer::TimeAgoComponent.new(time: DateTime.parse(time), micro: micro)) end # @param time datetime-local # @param micro [Boolean] toggle def default(time: Time.zone.now.to_s, micro: false) render(Primer::TimeAgoComponent.new(time: DateTime.parse(time), micro: micro)) end def micro render(Primer::TimeAgoComponent.new(time: Time.zone.now, micro: true)) end end end
Version data entries
11 entries across 11 versions & 1 rubygems