-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change components from ant design to tailwind css (#78)
- Loading branch information
Showing
6 changed files
with
98 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,34 @@ | ||
import React from 'react'; | ||
|
||
import { UserOutlined } from '@ant-design/icons'; | ||
import { Typography, Avatar, Card } from 'antd'; | ||
|
||
import styles from './MentorCard.module.css'; | ||
import { type Mentor } from '../../types'; | ||
|
||
const { Title, Text } = Typography; | ||
import { type Mentor } from '../../types.ts'; | ||
|
||
interface MentorCardProps { | ||
mentor: Mentor; | ||
} | ||
|
||
const MentorCard: React.FC<MentorCardProps> = ({ mentor }) => ( | ||
<Card className={styles.cardContainer}> | ||
<div className="border border-gray-200 p-4 rounded-md shadow-md w-52"> | ||
{mentor.profile.image_url !== null ? ( | ||
<Avatar | ||
<img | ||
src={mentor.profile.image_url} | ||
size={100} | ||
className={styles.avatarContainer} | ||
alt="Mentor Avatar" | ||
className="w-24 h-24 rounded-full mx-auto mb-4" | ||
/> | ||
) : ( | ||
<Avatar | ||
icon={<UserOutlined />} | ||
size={100} | ||
className={styles.avatarContainer} | ||
/> | ||
<div className="w-24 h-24 bg-gray-200 rounded-full mx-auto mb-4 flex items-center justify-center"> | ||
<UserOutlined className="text-gray-400 text-2xl" /> | ||
</div> | ||
)} | ||
<div className={styles.avatarContainer}> | ||
<Title level={5} className={styles.title}> | ||
<div className="text-center"> | ||
<h5 className="text-lg font-bold"> | ||
{mentor.profile.first_name} {mentor.profile.last_name} | ||
</Title> | ||
<Text>{mentor.application.designation}</Text> | ||
<br /> | ||
<Text type="secondary">{mentor.application.company_or_institution}</Text> | ||
</h5> | ||
<p className="text-sm">{mentor.application.designation}</p> | ||
<p className="text-xs text-gray-500"> | ||
{mentor.application.company_or_institution} | ||
</p> | ||
</div> | ||
</Card> | ||
</div> | ||
); | ||
|
||
export default MentorCard; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
import React from 'react'; | ||
|
||
import { Row, Col } from 'antd'; | ||
|
||
import { type Mentor } from '../../types'; | ||
import MentorCard from '../MentorCard/MentorCard.component'; | ||
import { type Mentor } from '../../types.ts'; | ||
|
||
interface ListProps { | ||
mentors?: Mentor[]; | ||
} | ||
|
||
export const MentorList: React.FC<ListProps> = ({ mentors }: ListProps) => ( | ||
<Row gutter={[16, 16]}> | ||
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4"> | ||
{mentors?.map((mentor) => ( | ||
<Col key={mentor.mentor_id} xs={24} sm={12} md={8} lg={6}> | ||
<div key={mentor.mentor_id} className="w-full"> | ||
<MentorCard mentor={mentor} /> | ||
</Col> | ||
</div> | ||
))} | ||
</Row> | ||
</div> | ||
); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,20 @@ | ||
import React from 'react'; | ||
|
||
import { Card, Space, Typography } from 'antd'; | ||
|
||
import styles from './TestimonialCard.module.css'; | ||
|
||
const { Text } = Typography; | ||
|
||
const TestimonialCard: React.FC = () => ( | ||
<Card className={styles.testimonialCardContainer}> | ||
<div className="border border-gray-200 p-4 rounded-md shadow-md w-52"> | ||
<img | ||
className={styles.testimonialCardImage} | ||
className="w-full h-40 object-cover rounded-md mb-4" | ||
src="/testimonial-image.png" | ||
alt="testimonial-image" | ||
/> | ||
<Space direction={'vertical'}> | ||
<Text className={styles.testimonialCardTitle}> | ||
Adipiscing aliquam scelerisque | ||
</Text> | ||
<Text className={styles.testimonialCardContent}> | ||
<div className="space-y-2"> | ||
<p className="text-lg font-bold">Adipiscing aliquam scelerisque</p> | ||
<p className="text-sm"> | ||
Sit tempor in egestas eget risus fames massa. Morbi vitae ante tortor | ||
lacinia amet cursus est eget nisi. Est mauris nam a euismod in nibh. | ||
</Text> | ||
</Space> | ||
</Card> | ||
</p> | ||
</div> | ||
</div> | ||
); | ||
|
||
export default TestimonialCard; |