Skip to content

Commit 672fd40

Browse files
committed
💄 transform table into card list
1 parent f93c077 commit 672fd40

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

client/modules/Mobile/MobileDashboardView.jsx

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Header from '../../components/mobile/Header';
99
import IconButton from '../../components/mobile/IconButton';
1010
import { ExitIcon, MoreIcon } from '../../common/icons';
1111
import Footer from '../../components/mobile/Footer';
12-
import { remSize } from '../../theme';
12+
import { remSize, prop } from '../../theme';
1313
import SketchList from '../IDE/components/SketchList';
1414
import CollectionList from '../IDE/components/CollectionList';
1515
import AssetList from '../IDE/components/AssetList';
@@ -26,7 +26,6 @@ const EXAMPLE_USERNAME = 'p5';
2626
const ContentWrapper = styled(Content)`
2727
table {
2828
table-layout: fixed;
29-
/* white-space: nowrap; */
3029
}
3130
3231
td ,thead button {
@@ -35,30 +34,41 @@ const ContentWrapper = styled(Content)`
3534
text-align: left;
3635
};
3736
38-
thead th { padding-left: 0; }
39-
40-
thead th:not(:first-child), tbody td {
41-
width: ${remSize(54)};
42-
}
43-
44-
tbody th { font-weight: bold; };
4537
4638
tbody th {
47-
font-size: ${remSize(12)};
39+
font-size: ${remSize(16)};
4840
width: 100%;
49-
padding-right: ${remSize(12)}
41+
padding-right: ${remSize(12)};
42+
font-weight: bold;
43+
display: flex;
44+
grid-area: name;
5045
};
5146
52-
tbody td {
53-
text-align: center;
47+
tbody td, thead th {
48+
justify-self: stretch;
49+
align-self: flex-end;
5450
}
5551
56-
.sketch-list__sort-button { padding: 0 }
52+
tbody td:nth-child(2) { grid-column-start: 2 }
53+
tbody td:last-child { justify-self: end }
54+
55+
/* .sketch-list__sort-button { padding: 0 } */
5756
tbody {
5857
height: ${remSize(48)};
5958
}
6059
6160
.sketches-table-container { padding-bottom: ${remSize(160)} }
61+
.sketches-table__row { background: white !important; height: auto }
62+
63+
tr {
64+
align-self: start;
65+
display: grid;
66+
grid-template-columns: repeat(4,1fr);
67+
grid-template-areas: "name name name name" "none content content content";
68+
69+
border-radius: ${remSize(4)}; padding: ${remSize(8)};
70+
box-shadow: 0 0 18px 0 ${prop('shadowColor')};
71+
};
6272
`;
6373

6474
const Subheader = styled.div`

0 commit comments

Comments
 (0)