mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
Add user location marker to brewery map, Add beer sec. for brewery posts
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
import React from 'react';
|
||||
import React, { FC } from 'react';
|
||||
import { HiLocationMarker } from 'react-icons/hi';
|
||||
|
||||
const LocationMarker = () => {
|
||||
return <HiLocationMarker className="text-3xl" />;
|
||||
interface LocationMarkerProps {
|
||||
size?: 'sm' | 'md' | 'lg' | 'xl';
|
||||
color?: 'blue' | 'red' | 'green' | 'yellow';
|
||||
}
|
||||
|
||||
const sizeClasses: Record<NonNullable<LocationMarkerProps['size']>, `text-${string}`> = {
|
||||
sm: 'text-2xl',
|
||||
md: 'text-3xl',
|
||||
lg: 'text-4xl',
|
||||
xl: 'text-5xl',
|
||||
};
|
||||
|
||||
const LocationMarker: FC<LocationMarkerProps> = ({ size = 'md', color = 'blue' }) => {
|
||||
return <HiLocationMarker className={`${sizeClasses[size]} text-${color}-400`} />;
|
||||
};
|
||||
|
||||
export default React.memo(LocationMarker);
|
||||
|
||||
Reference in New Issue
Block a user