Skip to content

Dan billing #1623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add footer option to small table
  • Loading branch information
chillenberger committed Sep 25, 2024
commit c17f124588c62cae2c5232acf4181a25e95269d1
7 changes: 7 additions & 0 deletions pgml-dashboard/src/components/tables/small/table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub struct Table {
classes: String,
headers: Vec<String>,
rows: Vec<Component>,
footers: Vec<Component>,
}

impl Table {
Expand All @@ -15,8 +16,14 @@ impl Table {
headers: headers.iter().map(|h| h.to_string()).collect(),
classes: "table table-sm".into(),
rows: rows.to_vec(),
footers: vec![],
}
}

pub fn footers(mut self, footer: Vec<Component>) -> Self {
self.footers = footer;
self
}
}

component!(Table);
14 changes: 13 additions & 1 deletion pgml-dashboard/src/components/tables/small/table/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ table.table.table-sm {
background: transparent;
text-transform: uppercase;
font-size: 12px;
padding: 12px 12px 12px 0;
padding: 12px 12px 12px 0.25rem;
border-bottom: 1px solid #{$gray-600};
font-weight: #{$font-weight-semibold};
}
Expand All @@ -28,6 +28,18 @@ table.table.table-sm {
}
}

tfoot {
td {
color: #{$gray-300};
background: transparent;
text-transform: uppercase;
font-size: 12px;
padding: 12px 12px 0px .25rem;
border-top: 1px solid #{$gray-600};
font-weight: #{$font-weight-semibold};
}
}

border-collapse: separate;
border-spacing: 0 12px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,13 @@
<%+ row %>
<% } %>
</tbody>
<% if !footers.is_empty() {%>
<tfoot>
<tr>
<% for footer in footers { %>
<td><%+ footer %></td>
<% } %>
</tr>
</tfoot>
<% } %>
</table>
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy