Add user location marker to brewery map, Add beer sec. for brewery posts

This commit is contained in:
Aaron William Po
2023-05-01 23:09:50 -04:00
parent f3d471be4c
commit d20ab0fd1f
10 changed files with 363 additions and 21 deletions

View File

@@ -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);