mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 01:54:00 +00:00
Move next js project to archive (#207)
This commit is contained in:
20
archive/next-js-web-app/src/components/ui/LocationMarker.tsx
Normal file
20
archive/next-js-web-app/src/components/ui/LocationMarker.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import React, { FC } from 'react';
|
||||
import { HiLocationMarker } from 'react-icons/hi';
|
||||
|
||||
interface LocationMarkerProps {
|
||||
size?: 'sm' | 'md' | 'lg' | 'xl';
|
||||
color?: 'blue' | 'red' | 'green' | 'yellow';
|
||||
}
|
||||
|
||||
const sizeClasses: Record<NonNullable<LocationMarkerProps['size']>, `text-${string}`> = {
|
||||
sm: 'text-lg',
|
||||
md: 'text-xl',
|
||||
lg: 'text-2xl',
|
||||
xl: 'text-3xl',
|
||||
};
|
||||
|
||||
const LocationMarker: FC<LocationMarkerProps> = ({ size = 'md', color = 'blue' }) => {
|
||||
return <HiLocationMarker className={`${sizeClasses[size]} text-${color}-600`} />;
|
||||
};
|
||||
|
||||
export default React.memo(LocationMarker);
|
||||
Reference in New Issue
Block a user