-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(course-card): move layout of course card to entity component
- Loading branch information
Showing
4 changed files
with
65 additions
and
53 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { Link } from '@remix-run/react' | ||
import { RatingStar } from 'assets/icons' | ||
import { Tag, Text } from '~/shared' | ||
|
||
interface Props { | ||
id: string | ||
picturePath: string | ||
name: string | ||
price: string | ||
rating: string | ||
} | ||
|
||
export function CourseCard({ id, picturePath, name, price, rating }: Props) { | ||
return ( | ||
<Link to={`/courses/${id}`}> | ||
<div className="w-[484px] h-[570px] bg-[#F6F6F6] pt-6 rounded-[20px] px-5"> | ||
<img | ||
className="h-[250px] w-[444px] mx-auto rounded-[20px]" | ||
src={ | ||
'https://mystudystorage.blob.core.windows.net/test/' + picturePath | ||
} | ||
alt="" | ||
/> | ||
|
||
<div className="mt-4 flex flex-row gap-[18px]"> | ||
<Tag>розробка</Tag> | ||
<Tag>python</Tag> | ||
<Tag>sql</Tag> | ||
</div> | ||
|
||
<p className="mt-4 leading-[26px] text-2xl font-sans font-medium text-[#0F0F10] p-0 m-0 not-italic font-manrope"> | ||
{name} | ||
</p> | ||
|
||
<Text className="text-[#4e4e51] mt-6"> | ||
It is test description of the course. It is test description of our | ||
course It is I need a lot of text to test the description of the | ||
course. It is test description of our course It is I need a lot of | ||
text to test the description of the course. | ||
</Text> | ||
|
||
<div className="bottom-6 absolute flex flex-row gap-[40px]"> | ||
<p className="font-bold text-[#1a1a1b] text-lg font-manrope color-[#161616] p-0 m-0 leading-[22px] not-italic font-manrope"> | ||
{price + ' UAH'} | ||
</p> | ||
|
||
<div className="flex flex-row"> | ||
<p className="mr-1 font-bold text-[#1a1a1b] text-lg font-manrope color-[#161616] p-0 m-0 leading-[22px] not-italic font-manrope"> | ||
{rating} | ||
</p> | ||
|
||
<img className="h-5 w-5" src={RatingStar} alt="" /> | ||
<img className="h-5 w-5" src={RatingStar} alt="" /> | ||
<img className="h-5 w-5" src={RatingStar} alt="" /> | ||
<img className="h-5 w-5" src={RatingStar} alt="" /> | ||
</div> | ||
</div> | ||
</div> | ||
</Link> | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './course-card' |
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