develop #16

Merged
HenriqueSantosSantana merged 65 commits from develop into main 2023-01-09 18:59:51 +00:00
19 changed files with 462 additions and 231 deletions
Showing only changes of commit bf7613db9e - Show all commits

View File

@ -17,6 +17,12 @@
<!--=-=-=-=-=-= ICON =-=-=-=-=-=-->
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<!--=-=-=-=-=-= ICONS =-=-=-=-=-=-->
<link
href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css"
rel="stylesheet"
/>
<title>Challenge - 5 | Institutional</title>
</head>
<body>

View File

@ -0,0 +1,16 @@
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_4238_664)">
<g clip-path="url(#clip1_4238_664)">
<path d="M19.1779 27.4911V18.544H22.1735L22.6229 15.0561H19.1779V12.8296C19.1779 11.8201 19.4565 11.1321 20.9027 11.1321L22.7441 11.1314V8.01168C22.4257 7.97021 21.3325 7.87512 20.0602 7.87512C17.4035 7.87512 15.5846 9.50028 15.5846 12.4842V15.0561H12.58V18.544H15.5846V27.4911H19.1779Z" fill="#303030"/>
</g>
<circle cx="17.5" cy="17.5" r="16.5" stroke="#303030" stroke-width="2"/>
</g>
<defs>
<clipPath id="clip0_4238_664">
<rect width="35" height="35" fill="white"/>
</clipPath>
<clipPath id="clip1_4238_664">
<rect width="19.574" height="19.616" fill="white" transform="translate(7.875 7.87509)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 799 B

View File

@ -0,0 +1,18 @@
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_4238_669)">
<g clip-path="url(#clip1_4238_669)">
<path d="M22.0996 7.87509H13.2966C10.3071 7.87509 7.875 10.3036 7.875 13.2884V22.0777C7.875 25.0626 10.3071 27.491 13.2966 27.491H22.0996C25.0893 27.491 27.5214 25.0625 27.5214 22.0777V13.2884C27.5215 10.3036 25.0893 7.87509 22.0996 7.87509ZM25.7784 22.0777C25.7784 24.103 24.1281 25.7506 22.0997 25.7506H13.2966C11.2683 25.7507 9.61813 24.103 9.61813 22.0777V13.2884C9.61813 11.2632 11.2683 9.61551 13.2966 9.61551H22.0996C24.128 9.61551 25.7783 11.2632 25.7783 13.2884V22.0777H25.7784Z" fill="#303030"/>
<path d="M17.6983 12.6288C14.9068 12.6288 12.6359 14.8962 12.6359 17.6833C12.6359 20.4703 14.9068 22.7376 17.6983 22.7376C20.4897 22.7376 22.7606 20.4703 22.7606 17.6833C22.7606 14.8962 20.4897 12.6288 17.6983 12.6288ZM17.6983 20.9971C15.8681 20.9971 14.379 19.5105 14.379 17.6832C14.379 15.8558 15.868 14.3691 17.6983 14.3691C19.5285 14.3691 21.0175 15.8558 21.0175 17.6832C21.0175 19.5105 19.5284 20.9971 17.6983 20.9971Z" fill="#303030"/>
<path d="M22.973 11.1531C22.6372 11.1531 22.3072 11.2889 22.0701 11.5267C21.8317 11.7634 21.6947 12.0929 21.6947 12.4294C21.6947 12.7648 21.8318 13.0943 22.0701 13.3321C22.3071 13.5688 22.6372 13.7057 22.973 13.7057C23.31 13.7057 23.6389 13.5688 23.8771 13.3321C24.1153 13.0943 24.2513 12.7647 24.2513 12.4294C24.2513 12.0929 24.1153 11.7634 23.8771 11.5267C23.64 11.2889 23.31 11.1531 22.973 11.1531Z" fill="#303030"/>
</g>
<circle cx="17.5" cy="17.5" r="16.5" stroke="#303030" stroke-width="2"/>
</g>
<defs>
<clipPath id="clip0_4238_669">
<rect width="35" height="35" fill="white"/>
</clipPath>
<clipPath id="clip1_4238_669">
<rect width="19.6465" height="19.616" fill="white" transform="translate(7.875 7.87509)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,18 @@
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_4238_684)">
<circle cx="17.5" cy="17.5" r="16.5" stroke="#303030" stroke-width="2"/>
<g clip-path="url(#clip1_4238_684)">
<path d="M13.4447 13.8592H10.2981C10.1584 13.8592 10.0453 13.9724 10.0453 14.112V24.2205C10.0453 24.3602 10.1584 24.4733 10.2981 24.4733H13.4447C13.5843 24.4733 13.6975 24.3602 13.6975 24.2205V14.112C13.6975 13.9724 13.5843 13.8592 13.4447 13.8592Z" fill="#303030"/>
<path d="M11.8725 8.83395C10.7276 8.83395 9.79614 9.76438 9.79614 10.908C9.79614 12.0522 10.7276 12.9829 11.8725 12.9829C13.0165 12.9829 13.9472 12.0521 13.9472 10.908C13.9472 9.76438 13.0165 8.83395 11.8725 8.83395Z" fill="#303030"/>
<path d="M21.4482 13.6079C20.1844 13.6079 19.2502 14.1512 18.6835 14.7685V14.112C18.6835 13.9724 18.5704 13.8592 18.4307 13.8592H15.4174C15.2777 13.8592 15.1646 13.9724 15.1646 14.112V24.2206C15.1646 24.3602 15.2777 24.4734 15.4174 24.4734H18.557C18.6967 24.4734 18.8098 24.3602 18.8098 24.2206V19.2192C18.8098 17.5338 19.2676 16.8772 20.4425 16.8772C21.722 16.8772 21.8236 17.9298 21.8236 19.3059V24.2206C21.8236 24.3603 21.9368 24.4734 22.0764 24.4734H25.2173C25.3569 24.4734 25.4701 24.3603 25.4701 24.2206V18.6759C25.4701 16.1698 24.9922 13.6079 21.4482 13.6079Z" fill="#303030"/>
</g>
</g>
<defs>
<clipPath id="clip0_4238_684">
<rect width="35" height="35" fill="white"/>
</clipPath>
<clipPath id="clip1_4238_684">
<rect width="15.6739" height="15.6739" fill="white" transform="translate(9.79614 8.81671)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,11 @@
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_4238_676)">
<circle cx="17.5" cy="17.5" r="16.5" stroke="#303030" stroke-width="2"/>
<path d="M29.9914 10.1563C29.0947 10.5497 28.1392 10.8104 27.143 10.937C28.1678 10.3251 28.95 9.36358 29.3177 8.20462C28.3622 8.7743 27.3072 9.1767 26.1829 9.40126C25.2757 8.43521 23.9826 7.83688 22.5719 7.83688C19.835 7.83688 17.6316 10.0584 17.6316 12.7817C17.6316 13.1735 17.6648 13.5503 17.7462 13.909C13.6363 13.7086 9.99962 11.7388 7.5566 8.73813C7.13009 9.47812 6.87991 10.3251 6.87991 11.2369C6.87991 12.949 7.76157 14.4666 9.07577 15.3453C8.28152 15.3302 7.50235 15.0996 6.84223 14.7364C6.84223 14.7515 6.84223 14.7711 6.84223 14.7907C6.84223 17.193 8.55581 19.1884 10.8029 19.6481C10.4005 19.7581 9.96195 19.8108 9.5068 19.8108C9.19031 19.8108 8.8708 19.7928 8.57089 19.7264C9.21141 21.6842 11.029 23.1235 13.1902 23.1702C11.5082 24.4859 9.37267 25.2786 7.06076 25.2786C6.65535 25.2786 6.26652 25.2605 5.87769 25.2108C8.06751 26.623 10.6628 27.4293 13.4614 27.4293C22.5583 27.4293 27.5318 19.8937 27.5318 13.3619C27.5318 13.1434 27.5243 12.9324 27.5137 12.7229C28.4948 12.0266 29.3192 11.157 29.9914 10.1563Z" fill="#303030"/>
</g>
<defs>
<clipPath id="clip0_4238_676">
<rect width="35" height="35" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,11 @@
<svg width="35" height="35" viewBox="0 0 35 35" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_4238_681)">
<circle cx="17.5" cy="17.5" r="16.5" stroke="#303030" stroke-width="2"/>
<path d="M27.8026 12.2486C27.5447 11.2896 26.7885 10.5336 25.8296 10.2754C24.0778 9.79605 17.0705 9.79605 17.0705 9.79605C17.0705 9.79605 10.0635 9.79605 8.3117 10.2572C7.37124 10.5152 6.59666 11.2897 6.33869 12.2486C5.87769 14.0003 5.87769 17.633 5.87769 17.633C5.87769 17.633 5.87769 21.284 6.33869 23.0174C6.59693 23.9763 7.35279 24.7323 8.31183 24.9905C10.0819 25.47 17.0708 25.47 17.0708 25.47C17.0708 25.47 24.0778 25.47 25.8296 25.0088C26.7887 24.7507 27.5447 23.9947 27.8029 23.0358C28.2638 21.284 28.2638 17.6515 28.2638 17.6515C28.2638 17.6515 28.2822 14.0003 27.8026 12.2486V12.2486ZM14.8396 20.989V14.277L20.6665 17.633L14.8396 20.989Z" fill="#303030"/>
</g>
<defs>
<clipPath id="clip0_4238_681">
<rect width="35" height="35" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 986 B

View File

@ -7,7 +7,7 @@ export interface MainProps
}
export interface HeaderProps
extends AccordionProps,
extends Omit<AccordionProps, 'setCurrentAccordion'>,
HTMLAttributes<HTMLDivElement> {
children: ReactNode | ReactNode[]
}

View File

@ -2,24 +2,25 @@ import { createContext, ReactNode } from 'react'
interface IAccordionItemsValues {
current: string | number | ''
handleSetCurrent: (customKey: string | number | '') => void
}
export let AccordionContextItems = createContext<IAccordionItemsValues>({
current: '',
})
} as IAccordionItemsValues)
interface AccordionProviderItemsProps {
children: ReactNode | ReactNode[]
current: string | number | ''
value: IAccordionItemsValues
}
export const AccordionProviderItems = ({
children,
current,
value,
}: AccordionProviderItemsProps) => {
return (
<>
<AccordionContextItems.Provider value={{ current }}>
<AccordionContextItems.Provider value={value}>
{children}
</AccordionContextItems.Provider>
</>

View File

@ -18,6 +18,12 @@
}
}
.accordion.active {
.accordion-content {
margin-top: 12px;
}
}
.accordion {
header {
width: 100%;

View File

@ -5,10 +5,10 @@ import { AccordionContextItems } from './context/Items'
import './index.scss'
const Main = ({ customKey, children, className, ...props }: MainProps) => {
const currentTargetItem = useContext(AccordionContextItems)
const { current } = useContext(AccordionContextItems)
const isOpen = () => {
if (currentTargetItem.current === customKey) {
if (current === customKey) {
return 'active'
} else {
return ''
@ -16,33 +16,23 @@ const Main = ({ customKey, children, className, ...props }: MainProps) => {
}
return (
<div className={`${className} accordion ${isOpen()}`} data-jsx="target" {...props}>
<div
className={`${className} accordion ${isOpen()}`}
data-jsx="target"
{...props}
>
{children}
</div>
)
}
const Header = ({
setCurrentAccordion,
customKey,
children,
className,
...props
}: HeaderProps) => {
const currentTargetItem = useContext(AccordionContextItems)
function handleEvent() {
if (customKey === currentTargetItem.current) {
setCurrentAccordion('')
} else {
setCurrentAccordion(customKey)
}
}
const Header = ({ customKey, children, className, ...props }: HeaderProps) => {
const { handleSetCurrent } = useContext(AccordionContextItems)
return (
<header
className={`${className}`}
onClick={handleEvent}
onClick={() => handleSetCurrent(customKey)}
role={'button'}
data-jsx="event"
{...props}

View File

@ -0,0 +1,14 @@
import { AnchorHTMLAttributes, HTMLAttributes, ReactNode } from 'react'
interface ItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
children: ReactNode | ReactNode[]
$container?: HTMLAttributes<HTMLLIElement>
}
export function Item({ children, $container, ...props }: ItemProps) {
return (
<li {...$container}>
<a {...props}>{children}</a>
</li>
)
}

View File

@ -1,163 +1,45 @@
import { AnchorHTMLAttributes, HTMLAttributes, ReactNode } from 'react'
import { Accordion } from '../../../components/Accordion'
import { AccordionProps } from '../../../components/Accordion/@types'
import BoletoImg from '../../../assets/brands/Boleto.png'
import DinersBrandImg from '../../../assets/brands/Diners.png'
import EloBrandImg from '../../../assets/brands/Elo.png'
import HiperBrandImg from '../../../assets/brands/Hiper.png'
import PaypalBrandImg from '../../../assets/brands/Paypal.png'
import MasterCardBrandImg from '../../../assets/brands/Master.png'
import VisaBrandImg from '../../../assets/brands/Visa.png'
import VtexPCIImg from '../../../assets/brands/vtex-pci-200.png'
import { AccordionProviderItems } from '../../../components/Accordion/context/Items'
import { ContactList } from './Lists/Contact'
import { InstitutionalList } from './Lists/Institutional'
import { QuestionsList } from './Lists/Question'
import { Socials } from './Lists/Socials'
import css from '../index.module.scss'
export function PaymentsList() {
let images = [
MasterCardBrandImg,
VisaBrandImg,
DinersBrandImg,
EloBrandImg,
HiperBrandImg,
PaypalBrandImg,
BoletoImg,
]
interface ListProps {
accordionCurrentIsOpen: string | number | ''
handleSetCurrentAccordion: (customKey: string | number | '') => void
}
export function List({
accordionCurrentIsOpen,
handleSetCurrentAccordion,
}: ListProps) {
return (
<ul className={css.payments}>
{images.map((image, index) => {
return (
<li key={index}>
<img src={image} alt="" />
<>
<AccordionProviderItems
value={{
current: accordionCurrentIsOpen,
handleSetCurrent: handleSetCurrentAccordion,
}}
>
<ul className={css.lists}>
<li>
<InstitutionalList customKey={'1'} />
</li>
<li>
<QuestionsList customKey={'2'} />
</li>
)
})}
<div className={css.divider}></div>
<li>
<img src={VtexPCIImg} alt="" />
</li>
</ul>
)
}
interface InstitutionalListProps extends AccordionProps {}
export function InstitutionalList({
setCurrentAccordion,
customKey,
}: InstitutionalListProps) {
return (
<Accordion customKey={customKey}>
<Accordion.Header
customKey={customKey}
className={`${css['list-header']}`}
setCurrentAccordion={setCurrentAccordion}
>
<h4>Institucional</h4>
</Accordion.Header>
<Accordion.Content className={`${css.content}`}>
<ul className={css.institutional}>
<Item $container={{ className: 'k' }} href="/">
Quem somos nós
</Item>
<Item $container={{ className: '' }} href="/">
Política de Privacidade
</Item>
<Item $container={{ className: '' }} href="/">
Segurança
</Item>
<Item $container={{ className: '' }} href="/">
Seja um Revendedor
</Item>
<li>
<ContactList customKey={'3'} />
</li>
</ul>
</Accordion.Content>
</Accordion>
)
}
interface QuestionsListProps extends AccordionProps {}
export function QuestionsList({
setCurrentAccordion,
customKey,
}: QuestionsListProps) {
return (
<Accordion customKey={customKey}>
<Accordion.Header
customKey={customKey}
className={`${css['list-header']}`}
setCurrentAccordion={setCurrentAccordion}
>
<h4>Dúvidas</h4>
</Accordion.Header>
<Accordion.Content className={`${css.content}`}>
<ul className={`${css['quesitons-list']}`}>
<Item $container={{ className: '' }} href="/">
Entrega
</Item>
<Item $container={{ className: '' }} href="/">
Pagamento
</Item>
<Item $container={{ className: '' }} href="/">
Trocas e Devoluções
</Item>
<Item $container={{ className: '' }} href="/">
Dúvidas Frequentes
</Item>
</ul>
</Accordion.Content>
</Accordion>
)
}
interface ContactListProps extends AccordionProps {}
export function ContactList({
setCurrentAccordion,
customKey,
}: ContactListProps) {
return (
<Accordion className={css.accordion} customKey={customKey}>
<Accordion.Header
customKey={customKey}
className={`${css['list-header']}`}
setCurrentAccordion={setCurrentAccordion}
>
<h4>Fale Conosco</h4>
</Accordion.Header>
<Accordion.Content className={`${css.content}`}>
<ul className={css.list}>
<Item $container={{ className: '' }} href="/">
Atendimento ao Consumidor
</Item>
<Item $container={{ className: '' }} href="/">
(11) 4159 9504
</Item>
<Item $container={{ className: '' }} href="/">
Atendimento Online
</Item>
<Item $container={{ className: '' }} href="/">
(11) 99433-8825
</Item>
</ul>
</Accordion.Content>
</Accordion>
)
}
interface ItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
children: ReactNode | ReactNode[]
$container?: HTMLAttributes<HTMLLIElement>
}
function Item({ children, $container, ...props }: ItemProps) {
return (
<li {...$container}>
<a {...props}>{children}</a>
</li>
<div className={css.social}>
<Socials />
<a href="/">www.loremipsum.com</a>
</div>
</AccordionProviderItems>
</>
)
}

View File

@ -0,0 +1,38 @@
import { Accordion } from '../../../../components/Accordion'
import { AccordionProps } from '../../../../components/Accordion/@types'
import { Item } from '../../components/Item'
import css from '../../index.module.scss'
interface ContactListProps
extends Omit<AccordionProps, 'setCurrentAccordion'> {}
export function ContactList({ customKey }: ContactListProps) {
return (
<Accordion className={css.accordion} customKey={customKey}>
<Accordion.Header
customKey={customKey}
className={`${css['list-header']}`}
>
<h4>Fale Conosco</h4>
</Accordion.Header>
<Accordion.Content className={`${css.content}`}>
<ul className={css.list}>
<Item $container={{ className: '' }} href="/">
Atendimento ao Consumidor
</Item>
<Item $container={{ className: '' }} href="/">
(11) 4159 9504
</Item>
<Item $container={{ className: '' }} href="/">
Atendimento Online
</Item>
<Item $container={{ className: '' }} href="/">
(11) 99433-8825
</Item>
</ul>
</Accordion.Content>
</Accordion>
)
}

View File

@ -0,0 +1,37 @@
import { Accordion } from '../../../../components/Accordion'
import { AccordionProps } from '../../../../components/Accordion/@types'
import { Item } from '../../components/Item'
import css from '../../index.module.scss'
interface InstitutionalListProps
extends Omit<AccordionProps, 'setCurrentAccordion'> {}
export function InstitutionalList({ customKey }: InstitutionalListProps) {
return (
<Accordion className={css.accordion} customKey={customKey}>
<Accordion.Header
customKey={customKey}
className={`${css['list-header']}`}
>
<h4>Institucional</h4>
</Accordion.Header>
<Accordion.Content className={`${css.content}`}>
<ul className={css.institutional}>
<Item $container={{ className: 'k' }} href="/">
Quem somos nós
</Item>
<Item $container={{ className: '' }} href="/">
Política de Privacidade
</Item>
<Item $container={{ className: '' }} href="/">
Segurança
</Item>
<Item $container={{ className: '' }} href="/">
Seja um Revendedor
</Item>
</ul>
</Accordion.Content>
</Accordion>
)
}

View File

@ -0,0 +1,40 @@
import BoletoImg from '../../../../assets/brands/Boleto.png'
import DinersBrandImg from '../../../../assets/brands/Diners.png'
import EloBrandImg from '../../../../assets/brands/Elo.png'
import HiperBrandImg from '../../../../assets/brands/Hiper.png'
import PaypalBrandImg from '../../../../assets/brands/Paypal.png'
import MasterCardBrandImg from '../../../../assets/brands/Master.png'
import VisaBrandImg from '../../../../assets/brands/Visa.png'
import VtexPCIImg from '../../../../assets/brands/vtex-pci-200.png'
import css from '../../index.module.scss'
export function PaymentsList() {
let images = [
MasterCardBrandImg,
VisaBrandImg,
DinersBrandImg,
EloBrandImg,
HiperBrandImg,
PaypalBrandImg,
BoletoImg,
]
return (
<ul className={css.payments}>
{images.map((image, index) => {
return (
<li key={index}>
<img src={image} alt="" />
</li>
)
})}
<div className={css.divider}></div>
<li>
<img src={VtexPCIImg} alt="" />
</li>
</ul>
)
}

View File

@ -0,0 +1,37 @@
import { Accordion } from '../../../../components/Accordion'
import { AccordionProps } from '../../../../components/Accordion/@types'
import { Item } from '../../components/Item'
import css from '../../index.module.scss'
interface QuestionsListProps
extends Omit<AccordionProps, 'setCurrentAccordion'> {}
export function QuestionsList({ customKey }: QuestionsListProps) {
return (
<Accordion className={css.accordion} customKey={customKey}>
<Accordion.Header
customKey={customKey}
className={`${css['list-header']}`}
>
<h4>Dúvidas</h4>
</Accordion.Header>
<Accordion.Content className={`${css.content}`}>
<ul className={`${css['quesitons-list']}`}>
<Item $container={{ className: '' }} href="/">
Entrega
</Item>
<Item $container={{ className: '' }} href="/">
Pagamento
</Item>
<Item $container={{ className: '' }} href="/">
Trocas e Devoluções
</Item>
<Item $container={{ className: '' }} href="/">
Dúvidas Frequentes
</Item>
</ul>
</Accordion.Content>
</Accordion>
)
}

View File

@ -0,0 +1,39 @@
import facebookIcon from '../../../../assets/icons/facebook.svg'
import instagramIcon from '../../../../assets/icons/instagram.svg'
import linkedinIcon from '../../../../assets/icons/linkedin.svg'
import twitterIcon from '../../../../assets/icons/twitter.svg'
import youtubeIcon from '../../../../assets/icons/youtube.svg'
import css from '../../index.module.scss'
export function Socials() {
return (
<ul className={css.socials}>
<li>
<a href="/">
<img src={facebookIcon} alt="" />
</a>
</li>
<li>
<a href="/">
<img src={instagramIcon} alt="" />
</a>
</li>
<li>
<a href="/">
<img src={twitterIcon} alt="" />
</a>
</li>
<li>
<a href="/">
<img src={youtubeIcon} alt="" />
</a>
</li>
<li>
<a href="/">
<img src={linkedinIcon} alt="" />
</a>
</li>
</ul>
)
}

View File

@ -14,13 +14,25 @@
}
.container-top {
display: flex;
align-items: flex-start;
flex-direction: column;
padding-top: 17px;
padding-bottom: 24px;
@media screen and (min-width: 1025px) {
display: flex;
flex-direction: row;
align-items: flex-start;
justify-content: space-between;
width: function.fluid(1080px, 1280px);
margin: 0 auto;
}
@media screen and (min-width: 2500px) {
width: function.fluid(2299.68px, 2500px);
}
}
.container-bottom {
@ -30,10 +42,6 @@
background-color: var(--clr-common-black);
.phrase {
font-size: var(--txt-xxs);
}
* p,
* li {
color: var(--clr-common-white);
@ -65,6 +73,13 @@
}
}
.accordion {
display: flex;
align-items: flex-start;
flex-direction: column;
justify-content: center;
}
// moved container bottom actions footer for large, medium devices
.container-bottom {
.actions-bottom {
@ -86,28 +101,21 @@
padding: 15px 0;
margin: 0 auto;
}
@media screen and (min-width: 2500px) {
width: function.fluid(2299.68px, 2500px);
}
}
}
.lists {
width: 100%;
display: flex;
align-items: stretch;
flex-direction: column;
gap: 5px;
@media screen and (min-width: 1025px) {
flex-direction: row;
.content {
height: auto;
overflow: unset;
transform: translate(0, 0);
}
}
gap: 12px;
.content {
margin-top: 7px;
ul {
display: flex;
align-items: flex-start;
@ -121,14 +129,44 @@
font-size: var(--txt-xs);
color: var(--clr-gray-800);
transition: color 200ms ease;
&:hover {
color: var(--clr-primary-blue-500);
}
}
}
@media screen and (min-width: 1025px) {
flex-direction: row;
justify-content: space-between;
width: function.fluid(707px, 1080px);
& > li {
width: function.fluid(155px, 707px);
}
.content {
height: auto;
overflow: unset;
transform: translate(0, 0);
}
}
@media screen and (min-width: 2500px) {
width: function.fluid(1531px, 2500px);
& > li {
width: function.fluid(315px, 1531px);
}
}
}
.list-header {
padding: 7px 0;
@media screen and (min-width: 1025px) {
margin-bottom: 12px;
i {
display: none;
}
@ -174,6 +212,53 @@
}
}
.social {
& > a {
display: none;
@media screen and (min-width: 1025px) {
display: block;
font-size: var(--txt-normal);
color: var(--clr-gray-800);
&:hover {
color: var(--clr-primary-blue-500);
}
}
}
@media screen and (min-width: 1025px) {
width: function.fluid(215px, 1080px);
}
@media screen and (min-width: 2500px) {
width: function.fluid(390px, 2299.68px);
}
}
.socials {
display: inline-flex;
align-items: center;
gap: 10px;
a {
display: flex;
align-items: center;
justify-content: center;
img {
width: 100%;
height: 100%;
@media screen and (min-width: 2500px) {
width: 75px;
height: 75px;
}
}
}
}
.container-bottom {
.phrase {
order: 2;

View File

@ -1,54 +1,36 @@
import { useState } from 'react'
import vtexIcon from '../../assets/brands/svgs/Vtex.svg'
import m3Icon from '../../assets/brands/svgs/M3.svg'
import { AccordionProviderItems } from '../../components/Accordion/context/Items'
import {
ContactList,
InstitutionalList,
PaymentsList,
QuestionsList,
} from './fragments/Lists'
import { List } from './fragments/Lists'
import { PaymentsList } from './fragments/Lists/Payment'
import css from './index.module.scss'
import { useState } from 'react'
export function Footer() {
const [AccordionCurrentIsOpen, setAccordionCurrentIsOpen] = useState<
const [accordionCurrentIsOpen, setAccordionCurrentIsOpen] = useState<
string | number | ''
>('')
function handleSetCurrentAccordion(customkey: string | number | '') {
if (window.innerWidth < 1024) setAccordionCurrentIsOpen(customkey)
if (window.innerWidth < 1024) {
if (customkey === accordionCurrentIsOpen) {
setAccordionCurrentIsOpen('')
} else {
setAccordionCurrentIsOpen(customkey)
}
}
}
return (
<footer className={css.footer}>
<div></div>
<div className={css['container-top']}>
<AccordionProviderItems current={AccordionCurrentIsOpen}>
<ul className={css.lists}>
<li>
<InstitutionalList
customKey={'1'}
setCurrentAccordion={handleSetCurrentAccordion}
/>
</li>
<li>
<QuestionsList
customKey={'2'}
setCurrentAccordion={handleSetCurrentAccordion}
/>
</li>
<li>
<ContactList
customKey={'3'}
setCurrentAccordion={handleSetCurrentAccordion}
/>
</li>
</ul>
</AccordionProviderItems>
<List
accordionCurrentIsOpen={accordionCurrentIsOpen}
handleSetCurrentAccordion={handleSetCurrentAccordion}
/>
</div>
<div className={css['container-bottom']}>