Skip to content

Commit

Permalink
style: changed card component style.
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbings authored and yunwei37 committed Sep 11, 2023
1 parent c79fc31 commit 230b901
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/pages/components/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
import {Component} from "react";
import Link from "next/link";

interface CardProps {
project: string;
org: string;
url: string;
}

export default class Card extends Component<CardProps, {}> {
render() {
return (
<div className="flex flex-col items-center justify-center">
<div className="flex flex-row shadow-lg items-center gap-4 p-4"
<a href={this.props.url} className="flex flex-row shadow-lg items-center gap-4 p-4"
style={{height: "108px", width: "250px"}}>
<img src="favicon.ico" alt="" style={{height: "42px"}} width="42"/>
<div className="flex flex-col justify-center">
<p className="text-lg text-gray-900">{this.props.project}</p>
<p className="text-sm text-gray-600">{`${this.props.org} / ${this.props.project}`}</p>
</div>
</div>
</a>
</div>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export default function Home() {
{
repository.map((value, index) => {
return (
<Card key={index} org={value.organization} project={value.project}/>
<Card key={index} org={value.organization} project={value.project} url={`/repository?id=${value.id}`}/>
)
})
}
Expand Down

0 comments on commit 230b901

Please sign in to comment.