-
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.
Merge pull request #35 from NUS-Fintech-Society/task-20-event-tag-des…
…ktop Task 20 event tag desktop
- Loading branch information
Showing
7 changed files
with
610 additions
and
555 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.container { | ||
display: flex; | ||
margin: 5px; | ||
padding: 5px; | ||
border-radius: 10px; | ||
} | ||
|
||
.container:hover { | ||
cursor: pointer; | ||
} | ||
|
||
.font { | ||
font-family: "DM Sans"; | ||
font-size: 10px; | ||
font-style: normal; | ||
font-weight: bold; | ||
line-height: normal; | ||
} | ||
|
||
.fontBlack { | ||
color: #151515; | ||
|
||
} | ||
|
||
.fontWhite { | ||
color: #ffffff; | ||
} |
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,29 @@ | ||
import styles from "css/events/EventTag.module.css"; | ||
import { EVENT_TAG_COLORS } from "../constants"; | ||
|
||
interface EventTagProps { | ||
name: string; | ||
datetime: Date; | ||
backgroundColor: string; | ||
} | ||
|
||
const EventTag = ({ | ||
name, | ||
backgroundColor, | ||
}: EventTagProps) => { | ||
return ( | ||
<div className={`${styles.container} ${styles.font}`} style={{ backgroundColor }}> | ||
<span | ||
className={ | ||
backgroundColor == EVENT_TAG_COLORS.PC | ||
? styles.fontWhite | ||
: styles.fontBlack | ||
} | ||
> | ||
{name} | ||
</span> | ||
</div> | ||
); | ||
}; | ||
|
||
export default EventTag; |
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 |
---|---|---|
|
@@ -28,4 +28,4 @@ enableMocking().then(() => { | |
</QueryClientProvider> | ||
</React.StrictMode>, | ||
) | ||
}) | ||
}) |
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,18 @@ | ||
import { EVENT_TAG_COLORS } from "@/components/constants"; | ||
import EventTag from "@/components/events/EventTag"; | ||
|
||
function EventPage() { | ||
return ( | ||
<> | ||
<EventTag name={'Event Test 1 - Software Development'} datetime={new Date()} backgroundColor={EVENT_TAG_COLORS.SD} /> | ||
<EventTag name={'Event Test 2 - Machine Learning'} datetime={new Date()} backgroundColor={EVENT_TAG_COLORS.ML} /> | ||
<EventTag name={'Event Test 3 - Blockchain'} datetime={new Date()} backgroundColor={EVENT_TAG_COLORS.BC} /> | ||
<EventTag name={'Event Test 4 - Quant'} datetime={new Date()} backgroundColor={EVENT_TAG_COLORS.Q} /> | ||
<EventTag name={'Event Test 5 - Internal Affairs'} datetime={new Date()} backgroundColor={EVENT_TAG_COLORS.IA} /> | ||
<EventTag name={'Event Test 6 - External Relations'} datetime={new Date()} backgroundColor={EVENT_TAG_COLORS.ER} /> | ||
<EventTag name={'Event Test 7 - Presidential Cell'} datetime={new Date()} backgroundColor={EVENT_TAG_COLORS.PC} /> | ||
</> | ||
) | ||
} | ||
|
||
export default EventPage |
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
Oops, something went wrong.