-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#150 enhancement: Resolve merge conflict
- Loading branch information
Showing
73 changed files
with
1,367 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...iders/SroreProvider/config/StateSchema.ts → ...iders/StoreProvider/config/StateSchema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@use '@/app/styles/index' as var; | ||
|
||
.card { | ||
min-width: 340px; | ||
position: relative; | ||
transition: transform 0.3s ease-in-out; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
gap: 15px; | ||
|
||
&:hover { | ||
transform: scale(1.1, 1.05); | ||
transition: transform 0.3s ease-in-out; | ||
} | ||
|
||
img { | ||
border-radius: 6px; | ||
transition: transform 0.3s ease-in-out; | ||
scroll-snap-align: start; | ||
} | ||
|
||
.heading | ||
{ | ||
font-size: #{'min(max(14px, 1.2vw), 16px)'}; | ||
} | ||
|
||
&:hover .heading { | ||
color: var.$link-color; | ||
} | ||
|
||
span { | ||
color: var.$body-color-light-grey; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import BlogCard from './BlogCard' | ||
import Img1 from '@/assets/images/blog/img-blog-01.png' | ||
|
||
const meta = { | ||
title: 'entities/BlogCard', | ||
component: BlogCard, | ||
parameters: { | ||
layout: 'centered' | ||
}, | ||
tags: ['autodocs'] | ||
} satisfies Meta<typeof BlogCard> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const Default: Story = { | ||
args: { | ||
card: { | ||
id: 1, | ||
src: Img1, | ||
alt: 'Покупай и не жди. До -50% на весь электротранспорт!', | ||
title: 'Покупай и не жди. До -50% на весь электротранспорт!', | ||
date: '8 Мая, 2022' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { FC } from 'react' | ||
import { TCard } from '@/models/CardModel' | ||
import styles from './BlogCard.module.scss' | ||
import Link from '@/shared/ui/Link/Link' | ||
import Heading, { HeadingType } from '@/shared/ui/Heading/Heading' | ||
|
||
export type Props = { | ||
card: TCard | ||
} | ||
|
||
/** | ||
* Карточка из блока блог | ||
* @param {TCard} card - параметры карточки из блога | ||
*/ | ||
|
||
const BlogCard: FC<Props> = ({ card }) => { | ||
return ( | ||
<Link to={''} className={styles.card}> | ||
<img src={card.src} alt={card.alt} draggable="false" /> | ||
<Heading type={HeadingType.NORMAL} className={styles.heading}> | ||
{card.title} | ||
</Heading> | ||
<span>{card.date}</span> | ||
</Link> | ||
) | ||
} | ||
|
||
export default BlogCard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,9 +49,5 @@ | |
|
||
.img { | ||
display: block; | ||
|
||
@include media.respond-to('small') { | ||
width: 120px; | ||
height: 120px; | ||
} | ||
max-width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { RootState } from '@/app/providers/SroreProvider/config/store' | ||
import { RootState } from '@/app/providers/StoreProvider/config/store' | ||
|
||
export const selectCategories = (state: RootState) => state.category.categories | ||
export const selectDisplayedCategories = (state: RootState) => state.category.displayedCategories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@use '@/app/styles/index' as var; | ||
|
||
.card { | ||
min-width: 340px; | ||
position: relative; | ||
transition: transform 0.3s ease-in-out; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
gap: 15px; | ||
|
||
&:hover { | ||
transform: scale(1.1, 1.05); | ||
transition: transform 0.3s ease-in-out; | ||
} | ||
|
||
img { | ||
border-radius: 6px; | ||
transition: transform 0.3s ease-in-out; | ||
scroll-snap-align: start; | ||
} | ||
|
||
.heading | ||
{ | ||
font-size: #{'min(max(14px, 1.2vw), 16px)'}; | ||
} | ||
|
||
&:hover .heading { | ||
color: var.$link-color; | ||
} | ||
|
||
span { | ||
color: var.$body-color-light-grey; | ||
} | ||
|
||
.promo { | ||
display: inline-block; | ||
position: absolute; | ||
top: 15px; | ||
left: 15px; | ||
background: var.$promo-color; | ||
border-radius: 5px; | ||
padding: 5px 10px; | ||
color: var.$white; | ||
font-size: 15px; | ||
line-height: 120%; | ||
font-weight: 500; | ||
} | ||
} |
Oops, something went wrong.