diff --git a/app/views/layouts/component_preview.html.erb b/app/views/layouts/component_preview.html.erb index 679f022ea16b..147a1778c64b 100644 --- a/app/views/layouts/component_preview.html.erb +++ b/app/views/layouts/component_preview.html.erb @@ -29,6 +29,9 @@ See COPYRIGHT and LICENSE files for more details. <%= include_frontend_assets %> + <%= stylesheet_link_tag "/highlighting/styles/#{Time.current.iso8601}", + media: :all, + skip_pipeline: true %> <% styles = [] diff --git a/lookbook/previews/open_project/work_packages/status_button_component_preview.rb b/lookbook/previews/open_project/work_packages/status_button_component_preview.rb index 1f05e2540ebd..b90c02ecfdca 100644 --- a/lookbook/previews/open_project/work_packages/status_button_component_preview.rb +++ b/lookbook/previews/open_project/work_packages/status_button_component_preview.rb @@ -9,7 +9,8 @@ class StatusButtonComponentPreview < ViewComponent::Preview # @param size [Symbol] select [small, medium, large] def playground(readonly: true, size: :medium) user = FactoryBot.build_stubbed(:admin) - render(WorkPackages::StatusButtonComponent.new(work_package: WorkPackage.visible.first, + work_package = FactoryBot.build_stubbed(:work_package, status: Status.first) + render(WorkPackages::StatusButtonComponent.new(work_package:, user:, readonly:, button_arguments: { size: }))