forked from ontoportal/ontoportal_web_ui
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* delete unnecessary components from the lookbook * move loader component and notification component to the display folder in the lookbook preview * add empty state component to the lookbook * add icon with tooltip buttons to lookbook * update pill button in the lookbook * add list items component to the look * remove component preview component from the lookbook * fix ListItemsShowMoreComponent was not displayed properly on lookbook * update usages of empty state
- Loading branch information
1 parent
2d48fa4
commit c5cd124
Showing
22 changed files
with
70 additions
and
120 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
class Display::EmptyStateComponent < ViewComponent::Base | ||
|
||
def initialize(text: t('no_result_was_found')) | ||
@text = text | ||
end | ||
|
||
|
||
def call | ||
content_tag(:div, class:'browse-empty-illustration') do | ||
inline_svg_tag('empty-box.svg') + | ||
content_tag(:p, @text) | ||
end.html_safe | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
test/components/previews/buttons/icon_with_tooltip_component_preview.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
class Buttons::IconWithTooltipComponentPreview < ViewComponent::Preview | ||
|
||
# @param title text | ||
|
||
def edit(icon: "edit.svg", title: "Edit") | ||
render IconWithTooltipComponent.new(icon: icon, link: "#", title: title) | ||
end | ||
|
||
# @param title text | ||
|
||
def delete(icon: "icons/delete.svg", title: "Delete") | ||
render IconWithTooltipComponent.new(icon: icon, link: "#", title: title) | ||
end | ||
|
||
|
||
# @param title text | ||
|
||
def preview(icon: "eye.svg", title: "Preview") | ||
render IconWithTooltipComponent.new(icon: icon, link: "#", title: title) | ||
end | ||
|
||
|
||
end |
7 changes: 0 additions & 7 deletions
7
test/components/previews/buttons/ontology_subscribe_button_component_preview.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 0 additions & 33 deletions
33
test/components/previews/concept_details_component_preview.rb
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
test/components/previews/display/empty_state_component_preview.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class Display::EmptyStateComponentPreview < ViewComponent::Preview | ||
|
||
def default() | ||
render Display::EmptyStateComponent.new(text: 'No result was found') | ||
end | ||
end |
10 changes: 0 additions & 10 deletions
10
test/components/previews/display/header_component_preview.rb
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
test/components/previews/display/language_field_component_preview.rb
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
test/components/previews/display/license_field_component_preview.rb
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
10 changes: 0 additions & 10 deletions
10
test/components/previews/display/search_result_component_preview.rb
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
test/components/previews/layout/list_items_show_more_component_preview.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class Layout::ListItemsShowMoreComponentPreview < ViewComponent::Preview | ||
|
||
def default | ||
render ListItemsShowMoreComponent.new(max_items: 5) do |component| | ||
10.times do |i| | ||
component.container do | ||
"Item #{i + 1}" | ||
end | ||
end | ||
end | ||
end | ||
|
||
end |