Skip to content

Commit 5ada270

Browse files
committed
Move playlist column widths into stylesheets
#72 (comment) 😅
1 parent d31b69e commit 5ada270

File tree

3 files changed

+37
-18
lines changed

3 files changed

+37
-18
lines changed

src/App.scss

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,27 @@
5858
thead {
5959
th {
6060
border-top-width: 0;
61+
62+
&.icon {
63+
width: 30px;
64+
}
65+
66+
&.owner {
67+
width: 150px;
68+
}
69+
70+
&.tracks {
71+
width: 100px;
72+
}
73+
74+
&.public,
75+
&.collaborative {
76+
width: 120px;
77+
}
78+
79+
&.export {
80+
width: 100px;
81+
}
6182
}
6283
}
6384

src/components/PlaylistTable.jsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,13 @@ class PlaylistTable extends React.Component {
202202
<table className="table table-hover table-sm">
203203
<thead>
204204
<tr>
205-
<th style={{ width: "30px" }}></th>
206-
<th>{this.props.i18n.t("playlist.name")}</th>
207-
<th style={{ width: "150px" }}>{this.props.i18n.t("playlist.owner")}</th>
208-
<th style={{ width: "100px" }} className="d-none d-sm-table-cell">{this.props.i18n.t("playlist.tracks")}</th>
209-
<th style={{ width: "120px" }} className="d-none d-sm-table-cell">{this.props.i18n.t("playlist.public")}</th>
210-
<th style={{ width: "120px" }} className="d-none d-md-table-cell">{this.props.i18n.t("playlist.collaborative")}</th>
211-
<th style={{ width: "100px" }} className="text-end">
205+
<th className="icon"></th>
206+
<th className="name">{this.props.i18n.t("playlist.name")}</th>
207+
<th className="owner">{this.props.i18n.t("playlist.owner")}</th>
208+
<th className="tracks d-none d-sm-table-cell">{this.props.i18n.t("playlist.tracks")}</th>
209+
<th className="public d-none d-sm-table-cell">{this.props.i18n.t("playlist.public")}</th>
210+
<th className="collaborative d-none d-md-table-cell">{this.props.i18n.t("playlist.collaborative")}</th>
211+
<th className="export text-end">
212212
<PlaylistsExporter
213213
accessToken={this.props.accessToken}
214214
onPlaylistsExportDone={this.handlePlaylistsExportDone}

src/components/__snapshots__/PlaylistTable.test.jsx.snap

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,37 +115,35 @@ exports[`playlist loading 1`] = `
115115
<thead>
116116
<tr>
117117
<th
118-
style="width: 30px;"
118+
class="icon"
119119
/>
120-
<th>
120+
<th
121+
class="name"
122+
>
121123
Name
122124
</th>
123125
<th
124-
style="width: 150px;"
126+
class="owner"
125127
>
126128
Owner
127129
</th>
128130
<th
129-
class="d-none d-sm-table-cell"
130-
style="width: 100px;"
131+
class="tracks d-none d-sm-table-cell"
131132
>
132133
Tracks
133134
</th>
134135
<th
135-
class="d-none d-sm-table-cell"
136-
style="width: 120px;"
136+
class="public d-none d-sm-table-cell"
137137
>
138138
Public?
139139
</th>
140140
<th
141-
class="d-none d-md-table-cell"
142-
style="width: 120px;"
141+
class="collaborative d-none d-md-table-cell"
143142
>
144143
Collaborative?
145144
</th>
146145
<th
147-
class="text-end"
148-
style="width: 100px;"
146+
class="export text-end"
149147
>
150148
<button
151149
class="text-nowrap btn btn-outline-secondary btn-xs"

0 commit comments

Comments
 (0)