@redneckz/wildless-cms-uni-blocks 0.2.48 → 0.2.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/Blocks.d.ts +3 -1
- package/dist/Blocks.js +2 -0
- package/dist/Blocks.js.map +1 -1
- package/dist/Footer/Sitemap.js +6 -4
- package/dist/Footer/Sitemap.js.map +1 -1
- package/dist/Header/Header.js +1 -1
- package/dist/Header/Header.js.map +1 -1
- package/dist/Header/HeaderSecondaryMenu.js +1 -1
- package/dist/Header/HeaderSecondaryMenu.js.map +1 -1
- package/dist/MobileAppTile.d.ts +5 -1
- package/dist/MobileAppTile.js +1 -1
- package/dist/MobileAppTile.js.map +1 -1
- package/dist/ProductBlockInner.js +2 -1
- package/dist/ProductBlockInner.js.map +1 -1
- package/dist/ProductGallery.js +2 -2
- package/dist/ProductGallery.js.map +1 -1
- package/dist/ProductTile.d.ts +17 -0
- package/dist/ProductTile.js +27 -0
- package/dist/ProductTile.js.map +1 -0
- package/dist/StepsBlock.js +7 -3
- package/dist/StepsBlock.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/ui-kit/TopItem.js +1 -1
- package/dist/ui-kit/TopItem.js.map +1 -1
- package/dist/utils/joinList.d.ts +1 -0
- package/dist/utils/joinList.js +7 -0
- package/dist/utils/joinList.js.map +1 -0
- package/lib/Blocks.d.ts +3 -1
- package/lib/Blocks.js +2 -0
- package/lib/Blocks.js.map +1 -1
- package/lib/Footer/Sitemap.js +6 -4
- package/lib/Footer/Sitemap.js.map +1 -1
- package/lib/Header/Header.js +1 -1
- package/lib/Header/Header.js.map +1 -1
- package/lib/Header/HeaderSecondaryMenu.js +1 -1
- package/lib/Header/HeaderSecondaryMenu.js.map +1 -1
- package/lib/MobileAppTile.d.ts +5 -1
- package/lib/MobileAppTile.js +1 -1
- package/lib/MobileAppTile.js.map +1 -1
- package/lib/ProductBlockInner.js +2 -1
- package/lib/ProductBlockInner.js.map +1 -1
- package/lib/ProductGallery.js +2 -2
- package/lib/ProductGallery.js.map +1 -1
- package/lib/ProductTile.d.ts +17 -0
- package/lib/ProductTile.js +25 -0
- package/lib/ProductTile.js.map +1 -0
- package/lib/StepsBlock.js +7 -3
- package/lib/StepsBlock.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/ui-kit/TopItem.js +1 -1
- package/lib/ui-kit/TopItem.js.map +1 -1
- package/lib/utils/joinList.d.ts +1 -0
- package/lib/utils/joinList.js +4 -0
- package/lib/utils/joinList.js.map +1 -0
- package/package.json +1 -1
- package/src/Blocks.ts +3 -0
- package/src/ContentPage.page.json +144 -1
- package/src/Footer/Sitemap.tsx +7 -5
- package/src/Header/Header.tsx +1 -1
- package/src/Header/HeaderSecondaryMenu.tsx +1 -1
- package/src/MobileAppTile.fixture.tsx +4 -1
- package/src/MobileAppTile.tsx +17 -10
- package/src/ProductBlockInner.tsx +4 -3
- package/src/ProductGallery.tsx +3 -5
- package/src/ProductTile.fixture.tsx +147 -0
- package/src/ProductTile.tsx +95 -0
- package/src/StepsBlock.tsx +20 -6
- package/src/index.ts +1 -0
- package/src/ui-kit/TopItem.tsx +1 -1
- package/src/utils/joinList.ts +7 -0
package/src/MobileAppTile.tsx
CHANGED
|
@@ -2,9 +2,14 @@ import { JSX } from '@redneckz/uni-jsx';
|
|
|
2
2
|
import { Tile } from './Tile';
|
|
3
3
|
import type { UniBlockProps } from './types';
|
|
4
4
|
|
|
5
|
+
export interface QRCode {
|
|
6
|
+
src?: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
5
10
|
export interface MobileAppTileContent {
|
|
6
11
|
title?: string;
|
|
7
|
-
qr?:
|
|
12
|
+
qr?: QRCode;
|
|
8
13
|
}
|
|
9
14
|
|
|
10
15
|
export interface MobileAppTileProps extends MobileAppTileContent, UniBlockProps {}
|
|
@@ -14,15 +19,17 @@ export const MobileAppTile = JSX<MobileAppTileProps>(
|
|
|
14
19
|
return (
|
|
15
20
|
<Tile className={className} context={context} title={title}>
|
|
16
21
|
<div className="flex items-center">
|
|
17
|
-
{qr && (
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
{qr?.src && qr?.href && (
|
|
23
|
+
<a href={qr.href} target="_blank">
|
|
24
|
+
<img
|
|
25
|
+
src={qr.src}
|
|
26
|
+
alt={title}
|
|
27
|
+
title={title}
|
|
28
|
+
width="164"
|
|
29
|
+
height="164"
|
|
30
|
+
className="w-[90px] h-[90px] bg-secondary-light"
|
|
31
|
+
/>
|
|
32
|
+
</a>
|
|
26
33
|
)}
|
|
27
34
|
<span className="font-normal text-sm text-secondary-text ml-4">
|
|
28
35
|
Наведите камеру телефона на QR-код и скачайте приложение
|
|
@@ -7,6 +7,7 @@ import type { ButtonProps } from './ui-kit/Button';
|
|
|
7
7
|
import { Button } from './ui-kit/Button';
|
|
8
8
|
import { Breadcrumb, BreadcrumbProps } from './ui-kit/Breadcrumb';
|
|
9
9
|
import { useLink } from './useLink';
|
|
10
|
+
import { joinList } from './utils/joinList';
|
|
10
11
|
|
|
11
12
|
const ICONS = { EmptyWalletIcon, PercentageSquareIcon, CalendarIcon };
|
|
12
13
|
|
|
@@ -32,7 +33,7 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
32
33
|
<div className="flex flex-col">
|
|
33
34
|
{breadcrumbs?.length ? (
|
|
34
35
|
<div className="text-xs mb-6">
|
|
35
|
-
{
|
|
36
|
+
{joinList(<span className="text-secondary-text mx-2">/</span>)(
|
|
36
37
|
breadcrumbs.map((breadcrumb, i) => (
|
|
37
38
|
<Breadcrumb
|
|
38
39
|
key={String(i)}
|
|
@@ -57,9 +58,9 @@ export const ProductBlockInner = JSX<ProductBlockInnerProps>(
|
|
|
57
58
|
<div className="flex gap-6 mt-7">{benefits.map(renderBenefit)}</div>
|
|
58
59
|
) : null}
|
|
59
60
|
{items?.length ? (
|
|
60
|
-
<section className="
|
|
61
|
+
<section className="mt-5" role="list">
|
|
61
62
|
{items.map((_, i) => (
|
|
62
|
-
<BlockItem key={String(i)} text={_} />
|
|
63
|
+
<BlockItem className="mb-2" key={String(i)} text={_} />
|
|
63
64
|
))}
|
|
64
65
|
</section>
|
|
65
66
|
) : null}
|
package/src/ProductGallery.tsx
CHANGED
|
@@ -29,16 +29,14 @@ export const ProductGallery = JSX<ProductGalleryProps>(
|
|
|
29
29
|
return (
|
|
30
30
|
<section className={`font-sans bg-white overflow-hidden w-100 ${className || ''}`}>
|
|
31
31
|
<div
|
|
32
|
-
className={`flex
|
|
32
|
+
className={`flex duration-1000`}
|
|
33
33
|
style={{ transform: `translateX(-${activeSlideIndex}00%)` }}
|
|
34
34
|
role="list"
|
|
35
35
|
>
|
|
36
36
|
{galleryBlocks.map((_, i) => renderProductBlock(_, i, context))}
|
|
37
37
|
</div>
|
|
38
38
|
|
|
39
|
-
<div
|
|
40
|
-
className={`border-0 border-t border-solid border-main-divider grid grid-cols-${galleryNav.length}`}
|
|
41
|
-
>
|
|
39
|
+
<div className={`border-t border-solid border-main-divider flex`}>
|
|
42
40
|
{galleryNav.map((slide, i) =>
|
|
43
41
|
renderNavButton({
|
|
44
42
|
slide,
|
|
@@ -73,7 +71,7 @@ function renderNavButton({ slide, i, activeSlideIndex, onClick, duration }) {
|
|
|
73
71
|
type="button"
|
|
74
72
|
key={String(i)}
|
|
75
73
|
onClick={onClick}
|
|
76
|
-
className={`group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 py-4`}
|
|
74
|
+
className={`group relative overflow-hidden border-0 bg-inherit cursor-pointer text-left px-0 py-4 grow basis-0`}
|
|
77
75
|
>
|
|
78
76
|
<div className="border-0 border-r border-solid border-main-divider px-6">
|
|
79
77
|
<div className={`text-sm font-medium group-hover:text-primary-text ${btnTitleClassName}`}>
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { context } from './setup-fixture';
|
|
2
|
+
|
|
3
|
+
import { ProductTile } from './ProductTile';
|
|
4
|
+
import { Picture } from './types';
|
|
5
|
+
|
|
6
|
+
const cardWithMoney: Picture = {
|
|
7
|
+
src: 'card-with-diamond.png',
|
|
8
|
+
alt: 'Кредиты в РСХБ',
|
|
9
|
+
format: 'webp',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const letterWithMoney: Picture = {
|
|
13
|
+
src: 'letter-with-money.png',
|
|
14
|
+
alt: 'Пенсионный кредит в РСХБ',
|
|
15
|
+
format: 'webp',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const building: Picture = {
|
|
19
|
+
src: 'building.png',
|
|
20
|
+
alt: 'Кредит под залог недвижимости в РСХБ',
|
|
21
|
+
format: 'webp',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
credit: (
|
|
26
|
+
<div className="grid grid-cols-12">
|
|
27
|
+
<ProductTile
|
|
28
|
+
context={context}
|
|
29
|
+
className="col-span-6"
|
|
30
|
+
title="Акция! “Кредит На все, что хочется!”"
|
|
31
|
+
description="Потребительский кредит на любые цели, без залога и поручительства"
|
|
32
|
+
benefits={[
|
|
33
|
+
{
|
|
34
|
+
label: 'Кредитный лимит',
|
|
35
|
+
description: 'до 5 млн Р',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: 'Процентная ставка',
|
|
39
|
+
description: 'от 12,5%',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: 'Срок кредитования',
|
|
43
|
+
description: 'до 5 лет',
|
|
44
|
+
},
|
|
45
|
+
]}
|
|
46
|
+
button={{
|
|
47
|
+
text: 'Подробнее',
|
|
48
|
+
href: '/credit-cards',
|
|
49
|
+
version: 'secondary',
|
|
50
|
+
}}
|
|
51
|
+
image={cardWithMoney}
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
),
|
|
55
|
+
pension: (
|
|
56
|
+
<div className="grid grid-cols-12">
|
|
57
|
+
<ProductTile
|
|
58
|
+
context={context}
|
|
59
|
+
className="col-span-6"
|
|
60
|
+
title="Акция! “Пенсионный кредит”"
|
|
61
|
+
description={'Потребительский кредит на любые цели, без залога и поручительства'}
|
|
62
|
+
benefits={[
|
|
63
|
+
{
|
|
64
|
+
label: 'Кредитный лимит',
|
|
65
|
+
description: 'до 3 млн Р',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: 'Процентная ставка',
|
|
69
|
+
description: 'от 12,5%',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: 'Срок кредитования',
|
|
73
|
+
description: 'до 3 лет',
|
|
74
|
+
},
|
|
75
|
+
]}
|
|
76
|
+
button={{
|
|
77
|
+
href: 'https://rshb.ru',
|
|
78
|
+
text: 'Подробнее',
|
|
79
|
+
target: '_blank',
|
|
80
|
+
version: 'secondary',
|
|
81
|
+
}}
|
|
82
|
+
image={letterWithMoney}
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
),
|
|
86
|
+
'credit-card': (
|
|
87
|
+
<div className="grid grid-cols-12">
|
|
88
|
+
<ProductTile
|
|
89
|
+
context={context}
|
|
90
|
+
className="col-span-8"
|
|
91
|
+
title="Кредит под залог недвижимости"
|
|
92
|
+
description={'Без переоформления залогой недвижимости на банк'}
|
|
93
|
+
benefits={[
|
|
94
|
+
{
|
|
95
|
+
label: 'Кредитный лимит',
|
|
96
|
+
description: 'до 10 млн Р',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
label: 'Процентная ставка',
|
|
100
|
+
description: 'от 21,5%',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
label: 'Срок кредитования',
|
|
104
|
+
description: 'до 10 лет',
|
|
105
|
+
},
|
|
106
|
+
]}
|
|
107
|
+
button={{
|
|
108
|
+
href: 'https://rshb.ru',
|
|
109
|
+
text: 'Подробнее',
|
|
110
|
+
target: '_blank',
|
|
111
|
+
version: 'secondary',
|
|
112
|
+
}}
|
|
113
|
+
image={building}
|
|
114
|
+
/>
|
|
115
|
+
</div>
|
|
116
|
+
),
|
|
117
|
+
'pension-credit': (
|
|
118
|
+
<div className="grid grid-cols-12">
|
|
119
|
+
<ProductTile
|
|
120
|
+
context={context}
|
|
121
|
+
className="col-span-4"
|
|
122
|
+
title="Кредит пенсионный"
|
|
123
|
+
description={'Для людей в возрасте до 75 лет'}
|
|
124
|
+
benefits={[
|
|
125
|
+
{
|
|
126
|
+
label: 'Кредитный лимит',
|
|
127
|
+
description: 'до 3 млн Р',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
label: 'Процентная ставка',
|
|
131
|
+
description: 'от 16,8%',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
label: 'Срок кредитования',
|
|
135
|
+
description: 'до 5 лет',
|
|
136
|
+
},
|
|
137
|
+
]}
|
|
138
|
+
button={{
|
|
139
|
+
href: 'https://rshb.ru',
|
|
140
|
+
text: 'Подробнее',
|
|
141
|
+
target: '_blank',
|
|
142
|
+
version: 'secondary',
|
|
143
|
+
}}
|
|
144
|
+
/>
|
|
145
|
+
</div>
|
|
146
|
+
),
|
|
147
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import type { ContentPageContext } from './ContentPageContext';
|
|
3
|
+
import { Img } from './Img';
|
|
4
|
+
import { BlockVersion, Picture } from './types';
|
|
5
|
+
import type { ButtonProps } from './ui-kit/Button';
|
|
6
|
+
import { Button } from './ui-kit/Button';
|
|
7
|
+
import { useLink } from './useLink';
|
|
8
|
+
import type { Benefit } from './types';
|
|
9
|
+
|
|
10
|
+
export interface ProductTileContent {
|
|
11
|
+
title?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
benefits?: Benefit[];
|
|
14
|
+
image?: Picture;
|
|
15
|
+
button?: ButtonProps;
|
|
16
|
+
version?: BlockVersion;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ProductTileProps extends ProductTileContent {
|
|
20
|
+
className?: string;
|
|
21
|
+
context: ContentPageContext;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const productTileStyleMap: Record<BlockVersion, string> = {
|
|
25
|
+
primary: 'bg-white text-primary-text',
|
|
26
|
+
secondary: 'bg-primary-main text-white',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const ProductTile = JSX<ProductTileProps>(
|
|
30
|
+
({ className, context, title, description, button, image, benefits, version = 'primary' }) => {
|
|
31
|
+
const router = context.useRouter();
|
|
32
|
+
const { handlerDecorator } = context;
|
|
33
|
+
return (
|
|
34
|
+
<section className={`font-sans p-9 ${className || ''} ${productTileStyleMap[version]}`}>
|
|
35
|
+
<div className="flex flex-col w-full">
|
|
36
|
+
{title && (
|
|
37
|
+
<h3 className="font-medium text-title-sm m-0 whitespace-pre-wrap max-w-[600px]">
|
|
38
|
+
{title}
|
|
39
|
+
</h3>
|
|
40
|
+
)}
|
|
41
|
+
{description && (
|
|
42
|
+
<div className="font-normal text-base max-w-[600px] mt-4">{description}</div>
|
|
43
|
+
)}
|
|
44
|
+
<div className="flex mt-5">
|
|
45
|
+
<div className="grow flex flex-col">
|
|
46
|
+
<div className="flex">
|
|
47
|
+
{benefits?.length ? (
|
|
48
|
+
<div className="mr-8">{benefits.map(renderBenefitDescription)}</div>
|
|
49
|
+
) : null}
|
|
50
|
+
{benefits?.length ? (
|
|
51
|
+
<div className="pt-1">
|
|
52
|
+
{benefits.map((_, i) => renderBenefitLabel(_, i, version))}
|
|
53
|
+
</div>
|
|
54
|
+
) : null}
|
|
55
|
+
</div>
|
|
56
|
+
{button?.text && (
|
|
57
|
+
<div className="mt-auto">
|
|
58
|
+
<Button
|
|
59
|
+
className="mt-8"
|
|
60
|
+
{...useLink({ router, handlerDecorator }, button)}
|
|
61
|
+
version="secondary"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
)}
|
|
65
|
+
</div>
|
|
66
|
+
{image && (
|
|
67
|
+
<div className="mt-auto flex-none h-[220px] w-[220px]">
|
|
68
|
+
<Img image={image} />
|
|
69
|
+
</div>
|
|
70
|
+
)}
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</section>
|
|
74
|
+
);
|
|
75
|
+
},
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
function renderBenefitLabel(benefit: Benefit, i: number, version = 'primary') {
|
|
79
|
+
const labelStyleMap: Record<BlockVersion, string> = {
|
|
80
|
+
primary: 'text-secondary-text',
|
|
81
|
+
secondary: 'text-white',
|
|
82
|
+
};
|
|
83
|
+
return (
|
|
84
|
+
<div key={String(i)} className={`text-sm mb-4 ${labelStyleMap[version]}`}>
|
|
85
|
+
{benefit.label}
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
function renderBenefitDescription(benefit: Benefit, i: number) {
|
|
90
|
+
return (
|
|
91
|
+
<div key={String(i)} className="text-xl font-medium mb-2.5">
|
|
92
|
+
{benefit.description}
|
|
93
|
+
</div>
|
|
94
|
+
);
|
|
95
|
+
}
|
package/src/StepsBlock.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { NewDocIcon, PassSendIcon, ActualBalanceIcon } from './Icons/index';
|
|
3
3
|
import type { UniBlockProps } from './types';
|
|
4
|
+
import { joinList } from './utils/joinList';
|
|
4
5
|
|
|
5
6
|
const ICONS = { NewDocIcon, PassSendIcon, ActualBalanceIcon };
|
|
6
7
|
export interface Step {
|
|
@@ -24,22 +25,35 @@ export const StepsBlock = JSX<StepsBlockProps>(({ className, title, steps }) =>
|
|
|
24
25
|
}`}
|
|
25
26
|
>
|
|
26
27
|
<h2 className="font-medium text-title m-0 max-w-[47rem] text-center">{title}</h2>
|
|
27
|
-
{steps?.length ?
|
|
28
|
+
{steps?.length ? (
|
|
29
|
+
<div>
|
|
30
|
+
<div className="flex mt-9 items-center px-[88px]">
|
|
31
|
+
{joinList(<div className="h-0.5 w-full bg-secondary-light"></div>)(
|
|
32
|
+
steps.map((step, i) => renderStepIcon(step, i)),
|
|
33
|
+
)}
|
|
34
|
+
</div>
|
|
35
|
+
<div className="flex mt-9 justify-between gap-x-24">{steps.map(renderStepTitle)}</div>
|
|
36
|
+
</div>
|
|
37
|
+
) : null}
|
|
28
38
|
</section>
|
|
29
39
|
);
|
|
30
40
|
});
|
|
31
41
|
|
|
32
|
-
const
|
|
42
|
+
const renderStepIcon = (step: Step, i: number) => {
|
|
33
43
|
return (
|
|
34
|
-
<div
|
|
35
|
-
key={String(i)}
|
|
36
|
-
className="flex flex-col items-center text-center px-12 relative after:content-[''] last:after:content-none after:bg-secondary-light after:absolute after:top-[50px] after:h-0.5 after:w-full after:right-[-50%]"
|
|
37
|
-
>
|
|
44
|
+
<div key={String(i)} className="flex flex-col items-center text-center relative">
|
|
38
45
|
<div className="h-[100px] w-[100px] min-w-[100px] min-h-[100px] bg-secondary-light rounded-full p-[26px] box-border z-10">
|
|
39
46
|
{(step.icon && ICONS[step.icon]?.({ width: 48, height: 48 })) || (
|
|
40
47
|
<span className="font-medium text-title-sm text-secondary-text">{i + 1}</span>
|
|
41
48
|
)}
|
|
42
49
|
</div>
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const renderStepTitle = (step: Step, i: number) => {
|
|
55
|
+
return (
|
|
56
|
+
<div key={String(i)} className="flex flex-col items-center text-center relative w-[276px]">
|
|
43
57
|
<div className="max-w-min">
|
|
44
58
|
<h5 className="font-medium text-xl m-0 mt-4 whitespace-nowrap px-3">{step.label}</h5>
|
|
45
59
|
{step.description && (
|
package/src/index.ts
CHANGED
package/src/ui-kit/TopItem.tsx
CHANGED
|
@@ -14,7 +14,7 @@ export interface TopItemProps extends TopItemContent {
|
|
|
14
14
|
|
|
15
15
|
export const TopItem = JSX<TopItemProps>(
|
|
16
16
|
({ className, text, href, target, active, flat, onClick, children, ariaLabel }) => {
|
|
17
|
-
const linkStyle = active ? 'border-primary-main rounded-
|
|
17
|
+
const linkStyle = active ? 'border-primary-main rounded-md' : 'border-transparent';
|
|
18
18
|
const textStyle = active
|
|
19
19
|
? 'text-primary-main'
|
|
20
20
|
: `${flat ? 'text-primary-text' : 'text-secondary-text'} hover:text-primary-main`;
|