Skip to content

Commit 70c31d6

Browse files
author
Di Wang
committed
add striped table
1 parent 1b453dc commit 70c31d6

File tree

3 files changed

+84
-1
lines changed

3 files changed

+84
-1
lines changed

src/app/dashboard/table/table.component.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.row{
2+
margin-top: 10px;
3+
}
4+
15
.card{
26
display: flex;
37
flex-direction: column;

src/app/dashboard/table/table.component.html

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,83 @@ <h4 class="card-title">Simple Table</h4>
6262
</div>
6363
</div>
6464
</div>
65+
<div class="row">
66+
<div class="col-md-12">
67+
<div class="card">
68+
<div class="card-header">
69+
<i class="material-icons">assignment</i>
70+
</div>
71+
<div class="card-content">
72+
<h4 class="card-title">Striped Table</h4>
73+
<div class="table-responsive">
74+
<table class="table table-striped">
75+
<thead>
76+
<tr>
77+
<th>#</th>
78+
<th></th>
79+
<th>Product Name</th>
80+
<th>Type</th>
81+
<th>Quantity</th>
82+
<th class="text-right">Price</th>
83+
<th class="text-right">Amount</th>
84+
</tr>
85+
</thead>
86+
<tbody>
87+
<tr>
88+
<td>1</td>
89+
<td><md-checkbox></md-checkbox></td>
90+
<td>Moleskine Agenda</td>
91+
<td>Oud-Office</td>
92+
<td>25</td>
93+
<td class="text-right">€ 49</td>
94+
<td class="text-right">€ 1,225</td>
95+
</tr>
96+
<tr>
97+
<td>2</td>
98+
<td><md-checkbox></md-checkbox></td>
99+
<td>Stabilo Pen</td>
100+
<td>Office</td>
101+
<td>35</td>
102+
<td class="text-right">€ 10</td>
103+
<td class="text-right">€ 300</td>
104+
</tr>
105+
<tr>
106+
<td>3</td>
107+
<td><md-checkbox></md-checkbox></td>
108+
<td>A4 Paper Pack</td>
109+
<td>Office</td>
110+
<td>50</td>
111+
<td class="text-right">€ 599.00</td>
112+
<td class="text-right">€ 109</td>
113+
</tr>
114+
<tr>
115+
<td>4</td>
116+
<td><md-checkbox></md-checkbox></td>
117+
<td>Apple iPad</td>
118+
<td>Meeting</td>
119+
<td>20</td>
120+
<td class="text-right">€ 10.99</td>
121+
<td class="text-right">€ 4,999</td>
122+
</tr>
123+
<tr>
124+
<td>5</td>
125+
<td><md-checkbox></md-checkbox></td>
126+
<td>Apple iPhone</td>
127+
<td>Communication</td>
128+
<td>10</td>
129+
<td class="text-right">€ 499.00</td>
130+
<td class="text-right">€ 5,999</td>
131+
</tr>
132+
<tr>
133+
<td colspan="5"></td>
134+
<td style="font-weight: 500; font-size: 1.25em;" class="text-right">Total</td>
135+
<td style="font-size: 26px" class="text-right">€12,999</td>
136+
</tr>
137+
</tbody>
138+
</table>
139+
</div>
140+
</div>
141+
</div>
142+
</div>
143+
</div>
65144
</div>

src/styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ p {
354354
margin: 20px 0 0 0;
355355
}
356356

357-
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
357+
.table > thead > tr > th, .table > tbody > tr > th, .table > thead > tr > td, .table > tbody > tr > td{
358358
padding: 12px 8px;
359359
vertical-align: middle;
360360
}

0 commit comments

Comments
 (0)