-
-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: testimonials alignment #3513
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -12,38 +12,47 @@ interface TestimonialProps { | |||||
} | ||||||
|
||||||
/** | ||||||
* @description This component displays Testimonial component. | ||||||
* @description This component displays a Testimonial card with consistent spacing and alignment. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to change the commen over here. |
||||||
* | ||||||
* @param {TestimonialProps} props - The props for the Testimonial component. | ||||||
* @param {string} props.className - Additional CSS class for styling the card. | ||||||
* @param {string} props.text - The testimonial from the author. | ||||||
* @param {string} props.authorName - The name of the author. | ||||||
* @param {string} props.authorDescription - The description of the author. | ||||||
* @param {string} props.authorAvatar - The path to avatar of the author. | ||||||
* @param {string} props.authorAvatar - The path to the avatar of the author. | ||||||
*/ | ||||||
export default function Testimonial({ | ||||||
className = '', | ||||||
text, | ||||||
authorName, | ||||||
authorDescription, | ||||||
authorAvatar | ||||||
authorAvatar, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Remove the trailing comma to comply with style guidelines. export default function Testimonial({
className = '',
text,
authorName,
authorDescription,
- authorAvatar,
+ authorAvatar
}: TestimonialProps) { 📝 Committable suggestion
Suggested change
🧰 Tools🪛 eslint[error] 29-29: Delete (prettier/prettier) [error] 29-29: Unexpected trailing comma. (comma-dangle) |
||||||
}: TestimonialProps) { | ||||||
return ( | ||||||
<li className={`p-4 sm:px-6 md:flex md:flex-row md:py-4 md:pr-0 ${className}`}> | ||||||
<blockquote className='mt-8 md:flex md:grow md:flex-col'> | ||||||
<div className='relative text-lg font-medium leading-7 text-gray-600 md:flex-1'> | ||||||
<IconQuote className='absolute left-0 top-0 size-8 -translate-y-2 text-primary-500' /> | ||||||
<Paragraph className='relative pl-10 text-left'>{text}</Paragraph> | ||||||
<li | ||||||
className={`flex flex-col gap-6 p-6 sm:px-8 sm:py-6 md:flex-row md:gap-8 md:p-8 ${className}`} | ||||||
> | ||||||
<blockquote className="flex flex-col gap-6 text-left md:flex-grow"> | ||||||
<div className="relative text-lg font-medium leading-7 text-gray-600"> | ||||||
<IconQuote className="absolute left-0 top-0 h-8 w-8 -translate-y-2 text-primary-500" /> | ||||||
<Paragraph className="relative pl-12">{text}</Paragraph> | ||||||
</div> | ||||||
<footer className='mt-6'> | ||||||
<div className='flex'> | ||||||
<figure className='inline-flex shrink-0 rounded-full border-2 border-white'> | ||||||
<img className='size-12 rounded-full' src={authorAvatar} alt={authorName} data-testid='Testimonial-img' /> | ||||||
</figure> | ||||||
<div className='ml-4 text-left'> | ||||||
<p className='text-base font-bold leading-6 text-gray-900'>{authorName}</p> | ||||||
<p className='text-base font-medium leading-6 text-primary-500'>{authorDescription}</p> | ||||||
</div> | ||||||
<footer className="flex items-center gap-4"> | ||||||
<figure className="flex-shrink-0 rounded-full border-2 border-white"> | ||||||
<img | ||||||
className="w-12 h-12 rounded-full" | ||||||
src={authorAvatar} | ||||||
alt={authorName} | ||||||
data-testid="Testimonial-img" | ||||||
/> | ||||||
</figure> | ||||||
<div> | ||||||
<p className="text-base font-bold leading-6 text-gray-900"> | ||||||
{authorName} | ||||||
</p> | ||||||
<p className="text-sm font-medium leading-5 text-primary-500"> | ||||||
{authorDescription} | ||||||
</p> | ||||||
</div> | ||||||
</footer> | ||||||
</blockquote> | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the lint errors.