File tree Expand file tree Collapse file tree 4 files changed +33
-0
lines changed
Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1616@import " components/turbo_progress_bar" ;
1717@import " components/navbar" ;
1818@import " components/flash" ;
19+ @import " components/empty_state" ;
1920
2021// Layouts
2122@import " layouts/container" ;
Original file line number Diff line number Diff line change 1+ .empty-state {
2+ padding : var (--space-m );
3+ border : var (--border );
4+ border-style : dashed ;
5+ text-align : center ;
6+
7+ & __text {
8+ font-size : var (--font-size-l );
9+ color : var (--color-text-header );
10+ margin-bottom : var (--space-l );
11+ font-weight : bold ;
12+ }
13+
14+ & --only-child {
15+ display : none ;
16+
17+ & :only-child {
18+ display : revert ;
19+ }
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ < div class ="empty-state empty-state--only-child ">
2+ < p class ="empty-state__text ">
3+ You don't have any quotes yet!
4+ </ p >
5+
6+ <%= link_to "Add quote" ,
7+ new_quote_path ,
8+ class : "btn btn--primary" ,
9+ data : { turbo_frame : dom_id ( Quote . new ) } %>
10+ </ div >
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ COMMENT
3131 <%= turbo_stream_from current_company , "quotes" %>
3232 <%= turbo_frame_tag Quote . new %>
3333 <%= turbo_frame_tag "quotes" do %>
34+ <%= render "quotes/empty_state" %>
3435 <%= render @quotes %>
3536 <% end %>
3637</ main >
You can’t perform that action at this time.
0 commit comments