-
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: navbar & club info tag component (#923)
Co-authored-by: Alder Whiteford <[email protected]> Co-authored-by: Alder Whiteford <[email protected]>
- Loading branch information
1 parent
c6daec3
commit fc151c4
Showing
14 changed files
with
1,078 additions
and
5,738 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
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
6 changes: 3 additions & 3 deletions
6
...tend/mobile/app/(app)/(tabs)/discover.tsx → ...tend/mobile/app/(app)/(tabs)/calendar.tsx
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,11 +1,11 @@ | ||
import { Box, Tag } from '@/app/(design-system)'; | ||
|
||
const DiscoverPage = () => { | ||
const CalendarPage = () => { | ||
return ( | ||
<Box flex={1} alignItems="center" justifyContent="center" padding="m"> | ||
<Tag>Tag</Tag> | ||
<Tag variant="darkRed">Calendar</Tag> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default DiscoverPage; | ||
export default CalendarPage; |
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
63 changes: 63 additions & 0 deletions
63
...le/app/(design-system)/components/ClubRecruitment/RecruitmentInfo/ClubRecruitmentInfo.tsx
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,63 @@ | ||
import React from 'react'; | ||
|
||
import { faCalendar } from '@fortawesome/free-regular-svg-icons/faCalendar'; | ||
import { faComments } from '@fortawesome/free-solid-svg-icons/faComments'; | ||
import { faPenToSquare } from '@fortawesome/free-solid-svg-icons/faPenToSquare'; | ||
import { RecruitmentCycle, RecruitmentType } from '@generatesac/lib'; | ||
|
||
import { Box, SACColors, createStyles } from '@/app/(design-system)'; | ||
|
||
import { RecruitmentItem } from '../RecruitmentItem/ClubRecruitmentItem'; | ||
|
||
interface RecruitmentInfoProps { | ||
color: SACColors; | ||
recruitmentCycle: RecruitmentCycle; | ||
recruitingType: RecruitmentType; | ||
isRecruiting?: boolean; | ||
recruitmentText: string; | ||
} | ||
|
||
export const RecruitmentInfo = ({ | ||
recruitmentText, | ||
color, | ||
recruitmentCycle, | ||
recruitingType, | ||
isRecruiting = false | ||
}: RecruitmentInfoProps) => { | ||
return ( | ||
<Box {...styles.recruitmentInfo}> | ||
<RecruitmentItem | ||
icon={faCalendar} | ||
title="Recruitment Cycle" | ||
text={recruitmentCycle} | ||
color={color} | ||
/> | ||
<RecruitmentItem | ||
icon={faPenToSquare} | ||
title={ | ||
isRecruiting | ||
? 'Currently Recruiting' | ||
: 'Currently Not Recruiting' | ||
} | ||
text={recruitmentText} | ||
color={color} | ||
/> | ||
<RecruitmentItem | ||
icon={faComments} | ||
title="Application Type" | ||
text={recruitingType} | ||
color={color} | ||
/> | ||
</Box> | ||
); | ||
}; | ||
|
||
const styles = createStyles({ | ||
recruitmentInfo: { | ||
padding: 'l', | ||
flexDirection: 'row', | ||
gap: 'm', | ||
alignItems: 'stretch', | ||
justifyContent: 'space-evenly' | ||
} | ||
}); |
55 changes: 55 additions & 0 deletions
55
...le/app/(design-system)/components/ClubRecruitment/RecruitmentItem/ClubRecruitmentItem.tsx
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,55 @@ | ||
import { IconDefinition } from '@fortawesome/fontawesome-svg-core'; | ||
|
||
import { Box, SACColors, Text, createStyles } from '@/app/(design-system)'; | ||
import { firstLetterUppercase } from '@/utils/string'; | ||
|
||
import { Icon } from '../../Icon/Icon'; | ||
|
||
interface RecruitmentItemProps { | ||
icon: IconDefinition; | ||
title: string; | ||
text: string; | ||
color: SACColors; | ||
} | ||
|
||
export const RecruitmentItem = ({ | ||
icon, | ||
title, | ||
text, | ||
color | ||
}: RecruitmentItemProps) => { | ||
return ( | ||
<Box {...styles.recruitmentItem}> | ||
<Box {...styles.recruitmentItemContent}> | ||
<Icon size={'medium'} color={color} icon={icon} /> | ||
<Text variant="body-1" {...styles.recruitmentItemTitle}> | ||
{firstLetterUppercase(title)} | ||
</Text> | ||
<Text variant="caption-1" style={{ textAlign: 'center' }}> | ||
{firstLetterUppercase(text)} | ||
</Text> | ||
</Box> | ||
</Box> | ||
); | ||
}; | ||
|
||
const styles = createStyles({ | ||
recruitmentItem: { | ||
alignItems: 'center', | ||
borderWidth: 1, | ||
borderRadius: 'base', | ||
borderColor: 'gray', | ||
width: '33%' | ||
}, | ||
recruitmentItemContent: { | ||
paddingTop: 'm', | ||
paddingBottom: 'm', | ||
gap: 'xs', | ||
flexDirection: 'column', | ||
alignItems: 'center' | ||
}, | ||
recruitmentItemTitle: { | ||
textAlign: 'center', | ||
fontWeight: '600' | ||
} | ||
}); |
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
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,3 @@ | ||
export const firstLetterUppercase = (str: string) => { | ||
return str.charAt(0).toUpperCase() + str.slice(1); | ||
}; |
Oops, something went wrong.