-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 공통 EventStatusBadge 컴포넌트를 구현하라 (#14)
- Loading branch information
1 parent
ae824bb
commit e7a285f
Showing
4 changed files
with
64 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
@import "/src/styles/main"; | ||
|
||
.eventStatusBadge { | ||
display: inline-flex; | ||
padding: 6px 12px; | ||
font-size: 12px; | ||
letter-spacing: -0.12px; | ||
border-radius: 20px; | ||
width: fit-content; | ||
|
||
&.warn { | ||
background-color: color('warning/dark'); | ||
|
||
@include text-color('warning'); | ||
} | ||
|
||
&.success { | ||
background-color: color('success/dark'); | ||
|
||
@include text-color('success'); | ||
} | ||
|
||
&.info { | ||
background-color: color('info/dark'); | ||
|
||
@include text-color('info'); | ||
} | ||
|
||
&.error { | ||
background-color: color('error/dark'); | ||
|
||
@include text-color('error'); | ||
} | ||
} |
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,21 @@ | ||
import clsx from 'clsx'; | ||
|
||
import styles from './index.module.scss'; | ||
|
||
type Props = { | ||
type: 'warn' | 'error' | 'success' | 'info'; | ||
text: string; | ||
}; | ||
|
||
function EventStatusBadge({ text, type }: Props) { | ||
return ( | ||
<div className={clsx(styles.eventStatusBadge, { | ||
[styles[type]]: type, | ||
})} | ||
> | ||
{text} | ||
</div> | ||
); | ||
} | ||
|
||
export default EventStatusBadge; |
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