Skip to content
Snippets Groups Projects
Commit 2ce45ecb authored by Mateusz Mikołajczak's avatar Mateusz Mikołajczak
Browse files

feat(drawer): add draft of drawer, move icons components to Icon folder

parent f65ae074
No related branches found
No related tags found
1 merge request!17Feature/add drawer ui
Showing
with 71 additions and 18 deletions
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2059_12637)">
<path d="M11.9997 10.5867L16.9497 5.63672L18.3637 7.05072L13.4137 12.0007L18.3637 16.9507L16.9497 18.3647L11.9997 13.4147L7.04974 18.3647L5.63574 16.9507L10.5857 12.0007L5.63574 7.05072L7.04974 5.63672L11.9997 10.5867Z" fill="#070130"/>
</g>
<defs>
<clipPath id="clip0_2059_12637">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>
...@@ -4,13 +4,13 @@ import { MapNavigation } from '@/components/FunctionalArea/MapNavigation'; ...@@ -4,13 +4,13 @@ import { MapNavigation } from '@/components/FunctionalArea/MapNavigation';
export const FunctionalArea = (): JSX.Element => ( export const FunctionalArea = (): JSX.Element => (
<> <>
<div className="absolute top-0 left-0 z-10 w-full"> <div className="absolute top-0 left-0 z-20 w-full">
<TopBar /> <TopBar />
</div> </div>
<div className="absolute left-[88px] top-16 z-10 w-[calc(100%-88px)]"> <div className="absolute left-[88px] top-16 z-20 w-[calc(100%-88px)]">
<MapNavigation /> <MapNavigation />
</div> </div>
<div className="absolute top-16 left-0 z-10 h-[calc(100%-64px)] flex"> <div className="absolute top-16 left-0 z-20 h-[calc(100%-64px)] flex">
<NavBar /> <NavBar />
</div> </div>
</> </>
......
import Image from 'next/image';
import closeIcon from '@/assets/vectors/icons/close.svg';
import { useState } from 'react';
import { Button } from '@/shared/Button';
import { twMerge } from 'tailwind-merge';
export const Drawer = (): JSX.Element | null => {
const [open, setOpenDrawer] = useState(false);
return (
<>
<Button
className="absolute top-[100px] left-[100px] z-20 peer"
onClick={() => setOpenDrawer(true)}
>
Open Drawer
</Button>
<div
className={twMerge(
'absolute top-[104px] left-[88px] w-[432px] h-calc-drawer bg-white-pearl text-font-500 transition-all duration-500 transform -translate-x-full',
open && 'translate-x-0',
)}
>
<div className="flex justify-between text-xl px-6 py-8 border-b border-b-[#E1E0E6]">
<div>
<span className="font-normal">Search: </span>
<span className="font-semibold">NADH</span>
</div>
<div className="cursor-pointer" onClick={() => setOpenDrawer(false)}>
<Image src={closeIcon} alt="close drawer" width="24" height="24" />
</div>
</div>
</div>
</>
);
};
export { Drawer } from './Drawer.component';
import mapImg from '@/assets/images/image.jpg'; import mapImg from '@/assets/images/image.jpg';
import { Drawer } from '@/components/Map/Drawer';
import Image from 'next/image'; import Image from 'next/image';
export const Map = (): JSX.Element => ( export const Map = (): JSX.Element => (
<div className="w-100 h-screen bg-black" data-testid="map-container"> <div className="w-100 h-screen bg-black relative" data-testid="map-container">
<Image src={mapImg} fill sizes="100vw" alt="map" /> <Drawer />
<Image src={mapImg} fill sizes="100vw" alt="map" className="z-0" />
</div> </div>
); );
import { ChevronRightIcon } from '@/assets/vectors/icons/ChevronRightIcon'; import { ChevronRightIcon } from '@/shared/Icon/Icons/ChevronRightIcon';
import { ChevronLeftIcon } from '@/assets/vectors/icons/ChevronLeftIcon'; import { ChevronLeftIcon } from '@/shared/Icon/Icons/ChevronLeftIcon';
import { ChevronUpIcon } from '@/assets/vectors/icons/ChevronUpIcon'; import { AdminIcon } from '@/shared/Icon/Icons/AdminIcon';
import { ChevronDownIcon } from '@/assets/vectors/icons/ChevronDownIcon'; import { ArrowIcon } from '@/shared/Icon/Icons/ArrowIcon';
import { PlusIcon } from '@/assets/vectors/icons/PlusIcon'; import { ChevronDownIcon } from '@/shared/Icon/Icons/ChevronDownIcon';
import { ArrowIcon } from '@/assets/vectors/icons/ArrowIcon'; import { ChevronUpIcon } from '@/shared/Icon/Icons/ChevronUpIcon';
import { DotsIcon } from '@/assets/vectors/icons/DotsIcon'; import { DotsIcon } from '@/shared/Icon/Icons/DotsIcon';
import { AdminIcon } from '@/assets/vectors/icons/AdminIcon'; import { ExportIcon } from '@/shared/Icon/Icons/ExportIcon';
import { ExportIcon } from '@/assets/vectors/icons/ExportIcon'; import { InfoIcon } from '@/shared/Icon/Icons/InfoIcon';
import { InfoIcon } from '@/assets/vectors/icons/InfoIcon'; import { LegendIcon } from '@/shared/Icon/Icons/LegendIcon';
import { LegendIcon } from '@/assets/vectors/icons/LegendIcon'; import { PageIcon } from '@/shared/Icon/Icons/PageIcon';
import { PageIcon } from '@/assets/vectors/icons/PageIcon'; import { PluginIcon } from '@/shared/Icon/Icons/PluginIcon';
import { PluginIcon } from '@/assets/vectors/icons/PluginIcon'; import { PlusIcon } from '@/shared/Icon/Icons/PlusIcon';
import type { IconTypes } from '@/types/iconTypes'; import type { IconTypes } from '@/types/iconTypes';
......
...@@ -25,6 +25,9 @@ const config: Config = { ...@@ -25,6 +25,9 @@ const config: Config = {
cultured: '#f7f7f8', cultured: '#f7f7f8',
'white-pearl': '#ffffff', 'white-pearl': '#ffffff',
}, },
height: {
'calc-drawer': 'calc(100% - 104px)',
},
}, },
fontFamily: { fontFamily: {
manrope: ['var(--font-manrope)'], manrope: ['var(--font-manrope)'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment