diff --git a/src/components/molecules/Checkbox/Checkbox.styles.module.scss b/src/components/molecules/Checkbox/Checkbox.styles.module.scss new file mode 100644 index 0000000..3713deb --- /dev/null +++ b/src/components/molecules/Checkbox/Checkbox.styles.module.scss @@ -0,0 +1,81 @@ +@import 'src/scss/mixins'; + +.checkbox-container { + display: flex; + width: 70%; + justify-content: center; + align-content: center; + cursor: pointer; + + @include mobile { + width: 100%; + } +} + +.information-block { + display: block; + width: 80%; + margin-left: 30%; +} + +.checkbox { + position: relative; + z-index: -1; + opacity: 0; + + & + label { + position: relative; + cursor: pointer; + + &::before { + content: ''; + position: absolute; + top: 34%; + width: 49px; + height: 23px; + border-radius: 13px; + background: $color-background-black; + transition: 0.2s; + border: 1px solid $color-white; + + @include mobile { + width: 29px; + height: 13px; + margin-top: 8px; + } + } + + &::after { + content: ''; + position: absolute; + top: 34%; + width: 23px; + height: 23px; + border-radius: 10px; + background: $color-base; + transition: 0.2s; + + @include mobile { + width: 13px; + height: 13px; + margin-top: 8px; + } + } + } + + &:checked + label { + &::before { + background: $color-base; + } + + &::after { + left: 26px; + border: 1px solid $color-white; + background-color: $color-background-black; + + @include mobile { + left: 16px; + } + } + } +} diff --git a/src/components/molecules/Checkbox/Checkbox.tsx b/src/components/molecules/Checkbox/Checkbox.tsx new file mode 100644 index 0000000..6d4ec29 --- /dev/null +++ b/src/components/molecules/Checkbox/Checkbox.tsx @@ -0,0 +1,45 @@ +import React, { useState } from 'react' + +import cx from 'classnames' + +import { InformationBlock } from 'src/components/molecules/TextBlocks/InformationBlock' + +import css from './Checkbox.styles.module.scss' + +export type CheckboxProps = { + className?: string + subheaderClassName?: string + citingClassName?: string + subheader?: string + citing?: string +} + +export const Checkbox = ({ className, citing, subheader, subheaderClassName, citingClassName }: CheckboxProps) => { + const [checked, setChecked] = useState(false) + + return ( +
+ setChecked(!checked)} + /> + +
+ ) +} diff --git a/src/components/molecules/Checkbox/index.ts b/src/components/molecules/Checkbox/index.ts new file mode 100644 index 0000000..0dab115 --- /dev/null +++ b/src/components/molecules/Checkbox/index.ts @@ -0,0 +1 @@ +export * from './Checkbox' diff --git a/src/components/molecules/InformationSection/InformationBlock/InformationBlock.styles.module.scss b/src/components/molecules/InformationSection/InformationBlock/InformationBlock.styles.module.scss new file mode 100644 index 0000000..132fc11 --- /dev/null +++ b/src/components/molecules/InformationSection/InformationBlock/InformationBlock.styles.module.scss @@ -0,0 +1,32 @@ +@import 'src/scss/mixins'; + +.information-block:not(:first-child) { + margin-top: 45px; +} + +.header { + font-size: 22px; + font-weight: 700; + font-family: $font-lato; + + @include mobile { + font-size: 18px; + font-weight: 500; + } +} + +.text { + font-family: $font-inter; + font-weight: 400; + line-height: 30px; + letter-spacing: 0; + text-align: left; + font-size: 22px; + color: #c4c4c4; + + @include mobile { + font-size: 16px; + font-weight: 400; + line-height: 19px; + } +} diff --git a/src/components/molecules/InformationSection/InformationBlock/InformationBlock.tsx b/src/components/molecules/InformationSection/InformationBlock/InformationBlock.tsx new file mode 100644 index 0000000..6b23d09 --- /dev/null +++ b/src/components/molecules/InformationSection/InformationBlock/InformationBlock.tsx @@ -0,0 +1,20 @@ +import React from 'react' + +import { InformationBlockContent } from 'src/components/molecules/InformationSection/InformationSection.types' + +import css from './InformationBlock.styles.module.scss' + +export type InformationBlockProps = InformationBlockContent + +export const InformationBlock = ({ header, texts }: InformationBlockProps) => { + return ( +
+

{header}

+ {texts.map((text, index) => ( +

+ {text} +

+ ))} +
+ ) +} diff --git a/src/components/molecules/InformationSection/InformationBlock/index.ts b/src/components/molecules/InformationSection/InformationBlock/index.ts new file mode 100644 index 0000000..9619367 --- /dev/null +++ b/src/components/molecules/InformationSection/InformationBlock/index.ts @@ -0,0 +1 @@ +export * from './InformationBlock' diff --git a/src/components/molecules/InformationSection/InformationSection.styles.module.scss b/src/components/molecules/InformationSection/InformationSection.styles.module.scss new file mode 100644 index 0000000..97d099f --- /dev/null +++ b/src/components/molecules/InformationSection/InformationSection.styles.module.scss @@ -0,0 +1,45 @@ +@import 'src/scss/mixins'; + +.information-section { + display: flex; + flex-flow: wrap; + align-items: flex-start; + + @include tablet { + align-items: flex-start; + } + + @include mobile { + width: 90%; + } +} + +.images, +.blocks { + margin-top: 80px; +} + +.blocks { + @include tablet { + width: 90%; + margin: 100px 20px; + } + + @include mobile { + width: 100%; + margin: 30px 0 0 23px; + } +} + +.images { + @include devices { + display: none; + } +} + +.image { + @include desktop { + width: 450px; + height: 450px; + } +} diff --git a/src/components/molecules/InformationSection/InformationSection.tsx b/src/components/molecules/InformationSection/InformationSection.tsx new file mode 100644 index 0000000..f53a4dc --- /dev/null +++ b/src/components/molecules/InformationSection/InformationSection.tsx @@ -0,0 +1,28 @@ +import React from 'react' + +import cx from 'classnames' + +import { Image } from 'src/components/atoms/Image' + +import { InformationBlock } from './InformationBlock' +import { getSections } from './InformationSection.utils' + +import css from './InformationSection.styles.module.scss' + +export const InformationSection = () => { + const sections = getSections() + return ( +
+
+
+ {sections.map((section, index) => { + return + })} +
+
+ +
+
+
+ ) +} diff --git a/src/components/molecules/InformationSection/InformationSection.types.ts b/src/components/molecules/InformationSection/InformationSection.types.ts new file mode 100644 index 0000000..d9ac062 --- /dev/null +++ b/src/components/molecules/InformationSection/InformationSection.types.ts @@ -0,0 +1,4 @@ +export type InformationBlockContent = { + header?: string + texts?: string[] +} diff --git a/src/components/molecules/InformationSection/InformationSection.utils.ts b/src/components/molecules/InformationSection/InformationSection.utils.ts new file mode 100644 index 0000000..ab08557 --- /dev/null +++ b/src/components/molecules/InformationSection/InformationSection.utils.ts @@ -0,0 +1,29 @@ +import { InformationBlockContent } from './InformationSection.types' + +const createSection = (header: string, texts: string[]): InformationBlockContent => { + return { + header, + texts + } +} + +export const getSections = (): InformationBlockContent[] => { + return [ + createSection('У вас есть доставка?', [ + 'Для Вас всегда доступны быстрые и надежные варианты доставки Вашего компьютера:', + '— Самовывоз', + '— Доставка до пункта выдачи', + '— Доставка до двери' + ]), + createSection('А в мой город доставите?', [ + 'Доставка осуществляется по всей России транспортными компаниями СДЭК, Деловые линии, DPD и Яндекс.Доставка.', + 'При оформлении заказа наши менеджеры помогут Вам рассчитать стоимость и время доставки.' + ]), + createSection('Как быстро?', [ + 'Всё зависит от наличия:', + '— Товар в наличии отправляем в течение дня после оформления заказа.', + '— Товар под заказ изготавливается не более 60 рабочих дней.' + ]), + createSection('Почему я должен вам верить?', ['По законам РФ покупатель получает кассовый чек и бланк предоплаты.']) + ] +} diff --git a/src/components/molecules/InformationSection/index.ts b/src/components/molecules/InformationSection/index.ts new file mode 100644 index 0000000..e748ab8 --- /dev/null +++ b/src/components/molecules/InformationSection/index.ts @@ -0,0 +1 @@ +export * from './InformationSection' diff --git a/src/components/molecules/TextBlocks/InformationBlock/InformationBlock.styles.module.scss b/src/components/molecules/TextBlocks/InformationBlock/InformationBlock.styles.module.scss new file mode 100644 index 0000000..2997700 --- /dev/null +++ b/src/components/molecules/TextBlocks/InformationBlock/InformationBlock.styles.module.scss @@ -0,0 +1,43 @@ +@import 'src/scss/mixins'; + +.block { + display: flex; + width: 100%; + flex-wrap: wrap; + + @include mobile { + width: 90%; + } +} + +.item, +.header { + font-size: 22px; + line-height: 50px; + letter-spacing: 0; + text-align: left; + margin: 5px; + + @include mobile { + font-size: 17px; + line-height: 32px; + } +} + +.header { + width: 100%; + font-weight: 500; +} + +.box { + display: flex; + width: 100%; + + @include mobile { + justify-content: left; + } +} + +.item-color { + color: $color-secondary; +} diff --git a/src/components/molecules/TextBlocks/InformationBlock/InformationBlock.tsx b/src/components/molecules/TextBlocks/InformationBlock/InformationBlock.tsx new file mode 100644 index 0000000..5d3c2f4 --- /dev/null +++ b/src/components/molecules/TextBlocks/InformationBlock/InformationBlock.tsx @@ -0,0 +1,50 @@ +import React from 'react' + +import cx from 'classnames' + +import { InformationBlockContent } from './InformationBlock.types' + +import css from './InformationBlock.styles.module.scss' + +export type InformationBlockProps = { + header?: string + blocks?: InformationBlockContent[] + href?: string + className?: string + classNameHeader?: string + classNameBox?: string + classNameSubheader?: string + classNameText?: string + classNameCiting?: string +} + +export const InformationBlock = ({ + className, + classNameHeader, + classNameBox, + classNameSubheader, + classNameText, + classNameCiting, + blocks, + header, + href +}: InformationBlockProps) => { + return ( +
+ {header && {header}} + {blocks?.map((block, index) => { + return ( +
+ {block.subheader && {block.subheader}} + {block.text && {block.text}} + {block.citing && ( + + {block.citing} + + )} +
+ ) + })} +
+ ) +} diff --git a/src/components/molecules/TextBlocks/InformationBlock/InformationBlock.types.ts b/src/components/molecules/TextBlocks/InformationBlock/InformationBlock.types.ts new file mode 100644 index 0000000..cc9e768 --- /dev/null +++ b/src/components/molecules/TextBlocks/InformationBlock/InformationBlock.types.ts @@ -0,0 +1,5 @@ +export type InformationBlockContent = { + subheader?: string + text?: string + citing?: string +} diff --git a/src/components/molecules/TextBlocks/InformationBlock/index.ts b/src/components/molecules/TextBlocks/InformationBlock/index.ts new file mode 100644 index 0000000..9619367 --- /dev/null +++ b/src/components/molecules/TextBlocks/InformationBlock/index.ts @@ -0,0 +1 @@ +export * from './InformationBlock' diff --git a/src/components/molecules/TextBlocks/TextBlocks.styles.module.scss b/src/components/molecules/TextBlocks/TextBlocks.styles.module.scss new file mode 100644 index 0000000..ce170e3 --- /dev/null +++ b/src/components/molecules/TextBlocks/TextBlocks.styles.module.scss @@ -0,0 +1,55 @@ +@import 'src/scss/mixins'; + +.container { + display: flex; + justify-content: left; + align-content: flex-start; + flex-wrap: wrap; + width: 100%; + margin-top: 40px; + + @include mobile { + margin-top: 0; + justify-content: center; + } +} + +.block { + margin-top: 15px; + + &:first-child { + margin-top: 30px; + + @include mobile { + margin-top: 0; + } + } +} + +.mailto { + @include flex-center; + + @include mobile { + display: flex; + justify-content: left; + width: 90%; + } +} + +.mailto-title, +.mailto-label { + font-size: 22px; + line-height: 50px; + letter-spacing: 0; + text-align: left; + margin: 5px; + + @include mobile { + font-size: 17px; + line-height: 32px; + } +} + +.mailto-label { + color: $color-base; +} diff --git a/src/components/molecules/TextBlocks/TextBlocks.tsx b/src/components/molecules/TextBlocks/TextBlocks.tsx new file mode 100644 index 0000000..0006d2f --- /dev/null +++ b/src/components/molecules/TextBlocks/TextBlocks.tsx @@ -0,0 +1,70 @@ +import React from 'react' + +import { Mailto } from 'src/components/molecules/Mailto' + +import { InformationBlock } from './InformationBlock' + +import css from './TextBlocks.styles.module.scss' + +export const TextBlocks = () => { + return ( +
+ + + + + + + + + + +
+ ) +} diff --git a/src/components/molecules/TextBlocks/index.ts b/src/components/molecules/TextBlocks/index.ts new file mode 100644 index 0000000..f1213b5 --- /dev/null +++ b/src/components/molecules/TextBlocks/index.ts @@ -0,0 +1 @@ +export * from './TextBlocks'