-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: apply slope status in slope page
- Loading branch information
1 parent
babd1fa
commit 04a6486
Showing
5 changed files
with
75 additions
and
24 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1 +1 @@ | ||
export type { Slope, Webcam, SlopeResponse } from './model'; | ||
export type { Level, Slope, Webcam, SlopeResponse } from './model'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React from 'react'; | ||
import { cn } from '../../../shared/lib'; | ||
import type { Level } from '../model'; | ||
|
||
const LEVEL: Record<Level, { text: string; color: string }> = { | ||
초급: { | ||
text: '초급', | ||
color: 'bg-sub-2', | ||
}, | ||
초중급: { | ||
text: '초중급', | ||
color: 'bg-sub-2', | ||
}, | ||
중급: { | ||
text: '중급', | ||
color: 'bg-sub-4', | ||
}, | ||
중상급: { | ||
text: '중상급', | ||
color: 'bg-sub-4', | ||
}, | ||
상급: { | ||
text: '상급', | ||
color: 'bg-gray-70', | ||
}, | ||
최상급: { | ||
text: '최상급', | ||
color: 'bg-gray-70', | ||
}, | ||
}; | ||
|
||
interface LevelChipProps { | ||
className?: string; | ||
level: Level; | ||
} | ||
|
||
const LevelChip = ({ level, className }: LevelChipProps) => { | ||
return ( | ||
<div | ||
className={cn( | ||
'flex h-[25px] w-[56px] items-center justify-center rounded-[6px] border-[1px] border-white border-opacity-10', | ||
LEVEL[level].color, | ||
className | ||
)} | ||
> | ||
<p className="body1-semibold text-white">{LEVEL[level].text}</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default LevelChip; |
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