-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FE][Feat] #280 : GuestView 화면 구현 및 좌표 가이드에 대한 색상 고려 로직 추가
- Loading branch information
Showing
6 changed files
with
58 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { MdAssistantNavigation, MdFlag, MdLocationOn } from 'react-icons/md'; | ||
import { IconContext } from 'react-icons'; | ||
import { ReactNode, useMemo } from 'react'; | ||
|
||
interface IMarkerData { | ||
name: string; | ||
icon: ReactNode; | ||
} | ||
|
||
export const GusetMarker = () => { | ||
const markerData: IMarkerData[] = [ | ||
{ name: '내 위치', icon: <MdAssistantNavigation color="blue" /> }, | ||
{ name: '도착지', icon: <MdFlag color="purple" /> }, | ||
{ name: '출발지', icon: <MdLocationOn color="red" /> }, | ||
]; | ||
|
||
const iconContextValue = useMemo(() => ({ color: 'purple', className: 'size-5' }), []); | ||
|
||
return ( | ||
<div className="z-4000 absolute bottom-8 right-5 w-fit text-base"> | ||
<ul className="flex flex-col gap-1"> | ||
<IconContext.Provider value={iconContextValue}> | ||
{markerData.map(data => ( | ||
<li className="flex items-center justify-between gap-2"> | ||
{data.icon} | ||
<span>{data.name}</span> | ||
</li> | ||
))} | ||
</IconContext.Provider> | ||
</ul> | ||
</div> | ||
); | ||
}; |
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,21 @@ | ||
import { MdAssistantNavigation } from 'react-icons/md'; | ||
import { IGuestData } from '@/types/channel.types.ts'; | ||
|
||
interface IUserMarkerProps { | ||
userData: IGuestData[]; | ||
} | ||
|
||
export const HostMarker = (props: IUserMarkerProps) => { | ||
return ( | ||
<div className="z-4000 absolute bottom-8 right-5 w-fit text-base"> | ||
<ul className="flex flex-col gap-2"> | ||
{props.userData.map(data => ( | ||
<li key={data.name} className="flex items-center justify-between gap-2"> | ||
<MdAssistantNavigation color={data.markerStyle.color} className="size-5" /> | ||
{data.name} | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
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