Skip to content

Commit

Permalink
Improve docs/gallery card component (microsoft#1445)
Browse files Browse the repository at this point in the history
* Improve docs/gallery card component

* added border to gallery card component
  • Loading branch information
namanbarkiya committed Jan 29, 2024
1 parent 6cf5bb0 commit 3608079
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions website/src/components/GalleryPage.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React, { useEffect, useState, useCallback } from "react";
import galleryData from "../data/gallery.json";
import { Card, List, Select } from "antd";
import { Card, List, Select, Typography } from "antd";
import { useLocation, useHistory } from "react-router-dom";

const { Option } = Select;
const { Paragraph, Title } = Typography;

const GalleryPage = () => {
const location = useLocation();
Expand Down Expand Up @@ -75,10 +76,10 @@ const GalleryPage = () => {
gutter: 16,
xs: 1,
sm: 2,
md: 3,
lg: 3,
xl: 4,
xxl: 4,
md: 2,
lg: 2,
xl: 3,
xxl: 3,
}}
dataSource={filteredData}
renderItem={(item) => (
Expand All @@ -92,6 +93,7 @@ const GalleryPage = () => {
<Card
hoverable
bordered
style={{ height: 370, paddingTop: 15 }}
cover={
<img
alt={item.title}
Expand All @@ -102,29 +104,27 @@ const GalleryPage = () => {
: `/autogen/img/gallery/${item.image}`
: `/autogen/img/gallery/default.png`
}
style={{
height: 150,
width: "fit-content",
margin: "auto",
padding: 2,
}}
/>
}
>
<div>
<span
style={{
fontSize: "1.2rem",
fontWeight: "bold",
color: "black",
}}
>
{item.title}
</span>
</div>
<div
<Title level={5} ellipsis={{ rows: 2 }}>
{item.title}
</Title>
<Paragraph
ellipsis={{ rows: 3 }}
style={{
// fontSize: "0.8rem",
fontWeight: "normal",
color: "#727272",
}}
>
{item.description ? item.description : item.title}
</div>
</Paragraph>
<TagsView tags={item.tags} />
</Card>
</a>
Expand Down

0 comments on commit 3608079

Please sign in to comment.