Skip to content

Commit f1eb2e1

Browse files
committed
wip
1 parent fe9e2f5 commit f1eb2e1

4 files changed

Lines changed: 9 additions & 14 deletions

File tree

admin/app/components/solidus_admin/ui/alert/component.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<%= icon %>
1414
</div>
1515
<div class="flex flex-col px-2 pt-1 gap-3">
16-
<p class="font-semibold text-base text-black leading-none"><%= @text %></p>
17-
<p class="font-normal text-sm text-black leading-none"><%= @text %></p>
16+
<p class="font-semibold text-base text-black leading-none"><%= @title %></p>
17+
<p class="font-normal text-sm text-black leading-none"><%= @description %></p>
1818
</div>
1919
</div>
2020
<div>

admin/app/components/solidus_admin/ui/alert/component.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ class SolidusAdmin::UI::Alert::Component < SolidusAdmin::BaseComponent
3535
},
3636
}
3737

38-
def initialize(text:, scheme: :success)
39-
@text = text
38+
def initialize(title:, description:, scheme: :success)
39+
@title = title
40+
@description = description
4041
@scheme = scheme
4142
end
4243

admin/app/views/layouts/solidus_admin/application.html.erb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,6 @@
2727
</div>
2828

2929
<main id="main" class="flex-grow">
30-
<div class="flex justify-center">
31-
<div class="flex flex-col w-3/4" role="alert">
32-
<%= render component("ui/alert").new(text: "foo", scheme: :danger) %>
33-
</div>
34-
</div>
35-
3630
<%= yield %>
3731
</main>
3832
</div>

admin/spec/components/previews/solidus_admin/ui/alert/component_preview/overview.html.erb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</h6>
66

77
<div class="w-5/6">
8-
<%= render current_component.new(scheme: :success, text: 'Product Saved') %>
8+
<%= render current_component.new(scheme: :success, title: "Added Solidus T-Shirt", description: "<a href='#' class='underline'>Add another product</a> or <a href='#' class='underline'>view product in a new window</a>".html_safe) %>
99
</div>
1010
</div>
1111

@@ -15,7 +15,7 @@
1515
</h6>
1616

1717
<div class="w-5/6">
18-
<%= render current_component.new(scheme: :warning, text: 'Server Error') %>
18+
<%= render current_component.new(scheme: :warning, title: "No active stock locations left", description: "You can assign new active stock location <a href='#' class='underline'>here</a>".html_safe) %>
1919
</div>
2020
</div>
2121

@@ -25,7 +25,7 @@
2525
</h6>
2626

2727
<div class="w-5/6">
28-
<%= render current_component.new(scheme: :danger, text: 'Server Error') %>
28+
<%= render current_component.new(scheme: :danger, title: "Request was not completed", description: "Cannot destroy default store") %>
2929
</div>
3030
</div>
3131

@@ -35,7 +35,7 @@
3535
</h6>
3636

3737
<div class="w-5/6">
38-
<%= render current_component.new(scheme: :info, text: 'Server Error') %>
38+
<%= render current_component.new(scheme: :info, title: "Locales available", description: "Did you know you can update storefront locales <a href='#' class='underline'>here</a>?".html_safe) %>
3939
</div>
4040
</div>
4141
</div>

0 commit comments

Comments
 (0)