footer? reviews

This commit is contained in:
Evdokia
2025-04-26 00:27:24 +03:00
parent 5ce92c4b81
commit 7f2ae842d2
16 changed files with 691 additions and 276 deletions

View File

@@ -0,0 +1,48 @@
.reviews-section {
max-width: 800px;
margin: 40px auto;
padding: 0 20px;
}
.reviews-section h2 {
text-align: center;
margin-bottom: 32px;
font-size: 26px;
}
.reviews-list {
display: flex;
flex-direction: column;
gap: 24px;
}
.review-card {
border: 1px solid #eee;
border-radius: 10px;
background: #fafbfc;
padding: 20px 24px;
box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.review-text {
font-size: 16px;
margin-bottom: 12px;
color: #222;
}
.review-meta {
display: flex;
align-items: center;
gap: 16px;
}
.review-author {
font-weight: bold;
color: #6C63FF;
}
.star-rating {
color: #FFD700;
font-size: 18px;
}

View File

@@ -0,0 +1,53 @@
import React from 'react';
import './Reviews.css';
const reviews = [
{
id: 1,
text: "Очень довольна сервисом и качеством продукции! Кожа стала заметно лучше.",
author: "Анна Петрова",
rating: 5
},
{
id: 2,
text: "Быстрая доставка, приятные цены. Закажу ещё!",
author: "Ирина Сидорова",
rating: 4
},
{
id: 3,
text: "Пользуюсь кремом уже месяц результат отличный!",
author: "Мария Иванова",
rating: 5
}
];
function StarRating({ rating }) {
return (
<span className="star-rating">
{'★'.repeat(rating)}
{'☆'.repeat(5 - rating)}
</span>
);
}
function Reviews() {
return (
<section className="reviews-section">
<h2>Отзывы пользователей</h2>
<div className="reviews-list">
{reviews.map(review => (
<div key={review.id} className="review-card">
<p className="review-text">"{review.text}"</p>
<div className="review-meta">
<span className="review-author">{review.author}</span>
<StarRating rating={review.rating} />
</div>
</div>
))}
</div>
</section>
);
}
export default Reviews;