Skip to content

Commit

Permalink
Add business card details
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyakwix committed Feb 3, 2024
1 parent 8a209f6 commit f7466e2
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 10 deletions.
69 changes: 62 additions & 7 deletions src/components/business-card/business-card.module.scss
Original file line number Diff line number Diff line change
@@ -1,27 +1,82 @@
.root {
}

.baseCardContent {
padding: 0;
}

.baseCardImage {
aspect-ratio: 2/1;
}

.content {
display: flex;
column-gap: 24px;
padding: 16px;
}

.restaurantDetailsContainer {
display: flex;
flex-direction: column;
min-width: 0;
}

.title {
font-family: inherit;
font-size: var(--text-large-font-size);
line-height: var(--text-large-line-height);
font-weight: 400;
color: var(--text-emphasized);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.baseCardContent {
padding: 0;
.description {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.baseCardImage {
aspect-ratio: 2/1;
.deliveryTimeContainer {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-basis: 80px;
flex-shrink: 0;
background-color: var(--background-accent-light);
border-radius: 12px;
row-gap: 2px;
}

.content {
padding: 16px;
.time {
font-size: var(--text-small-font-size);
line-height: 1;
}

.units {
font-size: var(--text-tiny-font-size);
line-height: 1;
}

.footer {
padding: 16px;
padding: 8px 16px;
box-shadow: 0 1px 0 0 var(--border-default) inset;
display: flex;
column-gap: 8px;
color: var(--text-muted);
font-size: var(--text-small-font-size);
line-height: var(--text-small-line-height);
}

.deliveryPrice {
}

.satisfactionScore {
display: inline-block;
padding-right: 4px;
padding-left: 4px;
border-radius: 4px;
box-shadow: 0 0 0 1px var(--border-emphasized) inset;
}
17 changes: 14 additions & 3 deletions src/components/business-card/business-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,21 @@ export const BusinessCard = ({
{...props}
>
<div className={classNames(styles.content, elementsClassNames?.content)}>
<h3 className={styles.title}>{title}</h3>
<span>{description}</span>
<div className={styles.restaurantDetailsContainer}>
<h3 className={styles.title}>{title}</h3>
<span className={styles.description}>{description}</span>
</div>
<div className={styles.deliveryTimeContainer}>
<span className={styles.time}>35-45 </span>
<span className={styles.units}>min</span>
</div>
</div>
<footer className={classNames(styles.footer, elementsClassNames?.footer)}></footer>
<footer className={classNames(styles.footer, elementsClassNames?.footer)}>
<span className={styles.deliveryPrice}>
<span>$</span>16.00
</span>
<span className={styles.satisfactionScore}>4.6</span>
</footer>
</BaseCard>
);
};

0 comments on commit f7466e2

Please sign in to comment.