Skip to content

Commit d8440d3

Browse files
committed
Adjust AuthorCard styling
1 parent cbda364 commit d8440d3

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@programmer_network/yail",
3-
"version": "1.0.152",
3+
"version": "1.0.153",
44
"description": "Programmer Network's official UI library for React",
55
"author": "Aleksandar Grbic - (https://programmer.network)",
66
"publishConfig": {

src/Components/AuthorCard/__snapshots__/AuthorCard.test.tsx.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`AuthorCard component > renders correctly 1`] = `
44
<DocumentFragment>
55
<div
6-
class="border border-primary-text-color p-6"
6+
class="border-2 border-primary-text-color/20 p-6 rounded-lg"
77
>
88
<div
99
class="flex flex-col items-center gap-4 md:flex-row"
@@ -24,13 +24,13 @@ exports[`AuthorCard component > renders correctly 1`] = `
2424
</div>
2525
</div>
2626
<div>
27-
<h3
28-
class="text-xs md:text-2xl font-bold text-primary mb-4 !mb-0"
27+
<h2
28+
class="text-lg md:text-3xl font-bold text-primary mb-4 !mb-0"
2929
>
3030
John Doe
31-
</h3>
31+
</h2>
3232
<p
33-
class="mb-2 text-primary-text-color !text-base"
33+
class="mb-2 text-primary-text-color !text-lg"
3434
>
3535
An expert in the field.
3636
</p>

src/Components/AuthorCard/index.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
1+
import classNames from "classnames";
12
import React from "react";
23

34
import Avatar from "Components/Avatar";
4-
import { H3, Paragraph } from "Components/Typography";
5+
import { H2, Paragraph } from "Components/Typography";
56

67
import { IAuthorCardProps } from "./types";
78

89
const AuthorCard: React.FC<IAuthorCardProps> = ({
910
name,
1011
avatar,
1112
about,
13+
className,
1214
onClick
1315
}) => {
1416
return (
1517
<div
16-
className='border border-primary-text-color p-6'
18+
className={classNames(
19+
"border-2 border-primary-text-color/20 p-6 rounded-lg",
20+
className
21+
)}
1722
onClick={() => (onClick ? onClick({ name, avatar, about }) : undefined)}
1823
>
1924
<div className='flex flex-col items-center gap-4 md:flex-row'>
2025
<div className='hidden md:block'>
2126
<Avatar src={avatar} size={75} />
2227
</div>
2328
<div>
24-
<H3 className='!mb-0'>{name}</H3>
25-
<Paragraph className='!text-base'>{about}</Paragraph>
29+
<H2 className='!mb-0'>{name}</H2>
30+
<Paragraph className='!text-lg'>{about}</Paragraph>
2631
</div>
2732
</div>
2833
</div>

src/Components/AuthorCard/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ export interface IAuthorCardProps {
33
avatar?: string;
44
about: string;
55
onClick?: (author: { name: string; avatar?: string; about: string }) => void;
6+
className?: string;
67
}

0 commit comments

Comments
 (0)