mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
Note Blankslate in empty state docs, show 3 WPs
Mentions that `with_empty_state` renders a `Primer::Beta::Blankslate` and accepts `title:`, `description:`, and `icon:` keywords. Bumps the work-package preview from 2 to 3 items for visual consistency with the other preview scenarios.
This commit is contained in:
@@ -112,7 +112,9 @@ for card-specific layout, parameters, and slots.
|
||||
|
||||
### Empty state
|
||||
|
||||
Use `with_empty_state` when the list can be rendered without items.
|
||||
Use `with_empty_state` when the list can be rendered without items. It renders a
|
||||
`Primer::Beta::Blankslate` under the hood, accepting `title:`, `description:`,
|
||||
and `icon:` keywords.
|
||||
|
||||
<%= embed OpenProject::Common::BorderBoxListComponentPreview, :empty_state, panels: %i[source] %>
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ module OpenProject
|
||||
interactive: false,
|
||||
collapsible: false
|
||||
)
|
||||
work_packages = WorkPackage.includes(:project).limit(2).to_a
|
||||
work_packages = WorkPackage.includes(:project).limit(3).to_a
|
||||
return preview_message("No work packages in the database.") if work_packages.empty?
|
||||
|
||||
render OpenProject::Common::BorderBoxListComponent.new(
|
||||
|
||||
Reference in New Issue
Block a user