Skip to content

Commit 53ed6a1

Browse files
committed
Resource card UI update
Former-commit-id: 20539cd
1 parent 437e6ac commit 53ed6a1

File tree

6 files changed

+31
-30
lines changed

6 files changed

+31
-30
lines changed

ui/src/components/ComponentInjector/ListSearchResults/ListSearchResults.module.scss

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
max-width: var(--bt-list-card-container);
55
gap: var(--bt-size-16);
66
margin: var(--bt-size-0) auto;
7-
overflow-x: hidden;
87

98
&__tag {
109
cursor: pointer;
1110
}
12-
}
11+
}

ui/src/components/ComponentInjector/ListSearchResults/index.tsx

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import style from "./ListSearchResults.module.scss";
2+
import { Row } from "antd";
23
import { Search, Text, getCategories } from "components/General";
34
import { List, ListProps } from "components/ComponentInjector";
45
import { API_ERROR, API_NO_DATA } from "data/constants";
@@ -58,11 +59,13 @@ const ListSearchResults = <T,>({
5859
categoryQuery={categoryQuery}
5960
onSearchCriteriaChange={onSearchCriteriaChange}
6061
/>
61-
<List
62-
items={list}
63-
itemComponent={itemComponent}
64-
isLoading={isLoading}
65-
/>
62+
<Row gutter={[24, 24]}>
63+
<List
64+
items={list}
65+
itemComponent={itemComponent}
66+
isLoading={isLoading}
67+
/>
68+
</Row>
6669
</div>
6770
);
6871
};

ui/src/components/InjectedComponent/ListItems/Resource/Resource.module.scss

+14-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
.resource {
2-
display: grid;
2+
box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
3+
transition: all .3s;
4+
min-height: 160px;
5+
border: 1px solid rgba(0,0,0,.05);
6+
border-radius: 8px;
7+
background-color: #fff;
8+
9+
&:hover {
10+
box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.18);
11+
transform: translate3d(0px, -4px, 0px);
12+
}
313

414
&_space {
515
display: grid;
6-
grid-template-columns: var(--bt-grid-template-1) var(
7-
--bt-grid-template-1
8-
) var(--bt-grid-template-1) auto;
16+
grid-template-columns:
17+
var(--bt-grid-template-1) var(--bt-grid-template-1)
18+
var(--bt-grid-template-1) auto;
919
}
1020

1121
&__avatar {
@@ -16,11 +26,6 @@
1626
width: var(--bt-size-50);
1727
}
1828

19-
&__container {
20-
display: flex;
21-
justify-content: space-between;
22-
align-items: center;
23-
}
2429

2530
@media screen and (max-width: 550px) {
2631
width: var(--bt-size-percent-100);

ui/src/components/InjectedComponent/ListItems/Resource/index.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import { Avatar, Card, Skeleton, Space, Tag, Typography } from "antd";
1+
import { Avatar, Card, Skeleton, Space, Tag, Typography,Col } from "antd";
22
import style from "./Resource.module.scss";
3-
import { Clipboard } from "components/ComponentInjector";
4-
import { ClipboardButton } from "components/InjectedComponent";
53
import { ListItemProps } from "components/ComponentInjector";
64

75
const { Title } = Typography;
@@ -29,6 +27,7 @@ const Resource: React.FC<ListItemProps<ResourceType>> = ({
2927
const { name, category, url } = resource || {};
3028

3129
return (
30+
<Col className="gutter-row" xs={24} md={12} xl={8}>
3231
<Card
3332
className={style.resource}
3433
key={name}
@@ -47,13 +46,14 @@ const Resource: React.FC<ListItemProps<ResourceType>> = ({
4746
</Space>
4847
</Space>
4948

50-
<Clipboard
49+
{/* <Clipboard
5150
text={url}
5251
clipboardComponent={ClipboardButton}
53-
/>
52+
/> */}
5453
</Space>
5554
</Skeleton>
5655
</Card>
56+
</Col>
5757
);
5858
};
5959

ui/src/styles/antd-overrides.css

+2-8
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,10 @@ h5 {
1313
border-inline-end: none !important;
1414
}
1515

16-
.ant-menu-submenu {
17-
/* can we do better? */
18-
padding-left: 20px !important;
19-
padding-right: 20px !important;
16+
.ant-layout{
17+
background-image: linear-gradient(to top, #e6e9f0 0%, #eef1f5 100%);
2018
}
2119

22-
.ant-menu-item {
23-
/* can we do better? */
24-
padding-left: 32px !important;
25-
}
2620

2721
.ant-input-textarea-affix-wrapper.ant-input-affix-wrapper > textarea.ant-input,
2822
.ant-layout-content,

ui/src/styles/sizes.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
:where(html) {
2-
--bt-list-card-container: 600px;
2+
--bt-list-card-container: 1024px;
33
--bt-converter-width: 800px;
44
--bt-card-height: 279px;
55

0 commit comments

Comments
 (0)