Skip to content
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

Feature/about store layout #14

Open
wants to merge 11 commits into
base: development
Choose a base branch
from
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 42 additions & 3 deletions src/layout/user/AboutStore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import Slider from 'react-slick'
import { styled } from '@mui/material'
import Footer from '../../components/footer/Footer'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Footer зачем?

import Header from '../../components/header/Header'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Header зачем?

import mapImage from '../../assets/images/mapOfKyrgyzstan.png'
import { ReactComponent as ArrowLeft } from '../../assets/icons/arrowLeft_icon.svg'
import { ReactComponent as ArrowRight } from '../../assets/icons/arrowRight_icon.svg'
import { CSSProperties, FC, MouseEventHandler } from 'react'

const StyledMainBlock = styled('div')(() => ({
width: '100%',
Expand Down Expand Up @@ -29,6 +33,10 @@ const StyledLayoutTitle = styled('h1')(() => ({
}))

const StyledSlider = styled(Slider)(() => ({
position: 'relative',
display: 'grid',
gridTemplateColumns: 'auto auto auto',
alignItems: 'center',
'& .slick-track': {
display: 'flex'
},
Expand All @@ -45,6 +53,21 @@ const StyledSlider = styled(Slider)(() => ({
width: '100%',
filter: 'brightness(100%)'
}
},
'& .slick-arrow': {
cursor: 'pointer'
},
'& .slick-prev': {
position: 'absolute',
display: 'block',
zIndex: 1,
left: '25%'
},
'& .slick-next': {
position: 'absolute',
display: 'block',
zIndex: 1,
right: '25%'
}
}))

Expand Down Expand Up @@ -89,6 +112,19 @@ const sliderImagesSources = [
}
]

type ComponentPropsType = {
className: string
style?: CSSProperties
onClick?: MouseEventHandler<SVGSVGElement>
}

const PrevArrow: FC<ComponentPropsType> = ({ className, style, onClick }) => {
return <ArrowLeft className={className} style={{ ...style }} onClick={onClick} />
}
const NextArrow: FC<ComponentPropsType> = ({ className, style, onClick }) => {
return <ArrowRight className={className} style={{ ...style }} onClick={onClick} />
}

const AboutStore = () => {
const settings = {
className: 'center',
Expand All @@ -98,8 +134,11 @@ const AboutStore = () => {
slidesToShow: 3,
speed: 500,
autoplaySpeed: 5000,
autoplay: true
autoplay: true,
prevArrow: <PrevArrow className="slick-prev" />,
nextArrow: <NextArrow className="slick-next" />
}

return (
<div style={{ background: '#F4F4F4' }}>
<Header />
Expand Down Expand Up @@ -196,8 +235,8 @@ const AboutStore = () => {
</p>
</div>

<div style={{ border: '1px solid', width: '55%' }}>
<img src="../../assets/images/mapOfKyrgyzstan.png" alt="1" />
<div style={{ width: '55%' }}>
<img style={{ width: '100%', marginTop: '4rem' }} src={mapImage} alt="1" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change inline css to component css

</div>
</article>
</section>
Expand Down