Sha256: 44d3cd6d5aa85dde4b23bc7943a48ec302951aef3c41a8c66207addc2c075ebc
Contents?: true
Size: 458 Bytes
Versions: 7
Compression:
Stored size: 458 Bytes
Contents
# frozen_string_literal: true module Primer # @label TimeAgoComponent class TimeAgoComponentPreview < ViewComponent::Preview # @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
7 entries across 7 versions & 1 rubygems