Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Color 추가 #26

Merged
merged 4 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/assets/icons/marker.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/components/common/Button/Button.variants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ export const ButtonVariants = cva(
{
variants: {
variant: {
primary: 'bg-primary text-white disabled:opacity-50 disabled:cursor-not-allowed',
gray: 'bg-gray-100 text-gray-950 disabled:opacity-50 disabled:cursor-not-allowed',
primary:
'bg-primary text-white hover:bg-[#FF3131] disabled:opacity-50 disabled:cursor-not-allowed',
Comment on lines +9 to +10
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

하드코딩된 색상값을 테마 토큰으로 변경해주세요.

hover 상태의 색상값이 직접 하드코딩되어 있습니다. 테마 시스템의 일관성을 위해 색상 토큰을 사용하는 것이 좋습니다.

다음과 같이 수정해주세요:

-'bg-primary text-white hover:bg-[#FF3131] disabled:opacity-50 disabled:cursor-not-allowed',
+'bg-primary text-white hover:bg-primary-dark disabled:opacity-50 disabled:cursor-not-allowed',
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
primary:
'bg-primary text-white hover:bg-[#FF3131] disabled:opacity-50 disabled:cursor-not-allowed',
primary:
'bg-primary text-white hover:bg-primary-dark disabled:opacity-50 disabled:cursor-not-allowed',

gray: 'bg-gray-150 text-gray-950 hover:bg-gray-200 disabled:opacity-50 disabled:cursor-not-allowed',
},
size: {
large: 'w-full h-16 text-xl font-medium',
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const Input = forwardRef<HTMLInputElement, Props>(
onBlur={onBlur}
ref={ref}
placeholder="링크를 입력해주세요."
className="w-full h-11 text-body3 bg-gray-50 pl-5 pr-10 rounded-lg outline-none focus:outline-1 focus:outline-offset-0 focus:outline-gray-500 transition-colors"
className="w-full h-11 text-body3 bg-gray-100 pl-5 pr-10 rounded-lg outline-none focus:outline-1 focus:outline-offset-0 focus:outline-gray-400 transition-colors"
{...props}
/>
{value && (
Expand Down
20 changes: 5 additions & 15 deletions src/components/common/Marker/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,16 @@ import { Props } from './Marker.types';

import { Icon } from '../Icon';

export const Marker = ({ categoryName, ...props }: Props) => {
const ICON_SIZE = 35;
const ICON_POSITIONS = {
default: { left: '51%', top: '1/2' },
restaurant: { left: '51%', top: '[55%]' },
};
const ICON_SIZE = 30;

const position =
categoryName === 'restaurant' ? ICON_POSITIONS.restaurant : ICON_POSITIONS.default;
export const Marker = ({ categoryName, ...props }: Props) => {
return (
<button
aria-label={`${categoryName} location marker`}
className="relative inline-block"
{...props}
>
<MarkerIcon />
<button aria-label={`${categoryName} location marker`} className="relative" {...props}>
<MarkerIcon className="relative" />
<Icon
name={categoryName}
size={ICON_SIZE}
className={`absolute left-[${position.left}] top-${position.top} -translate-x-1/2 -translate-y-1/2`}
className="absolute left-1/2 top-[45%] -translate-x-1/2 -translate-y-1/2"
/>
</button>
);
Expand Down
Empty file removed src/components/features/.gitkeep
Empty file.
Empty file removed src/routes/.gitkeep
Empty file.
Empty file removed src/styles/.gitkeep
Empty file.
5 changes: 3 additions & 2 deletions src/styles/theme/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ export const colors = {
white: '#FFFFFF',
black: '#0F0F0F',
gray: {
50: '#EEF0F6',
100: '#DCE2E8',
50: '#F6F8FD',
100: '#EEF0F6',
150: '#DCE2E8',
200: '#CBD1D9',
300: '#B9BfC7',
400: '#A1AAB1',
Expand Down
Loading