-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add CalendarHeader and its Storybook, need to resize
- Loading branch information
Showing
4 changed files
with
86 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import CalendarHeader from '@views/components/common/CalendarHeader/CalenderHeader'; | ||
|
||
const meta = { | ||
title: 'Components/CalendarHeader', | ||
component: CalendarHeader, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof CalendarHeader>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = {}; |
53 changes: 53 additions & 0 deletions
53
src/views/components/common/CalendarHeader/CalenderHeader.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,53 @@ | ||
import React from 'react'; | ||
import { Status } from '@shared/types/Course'; | ||
import Divider from '../Divider/Divider'; | ||
import { Button } from '../Button/Button'; | ||
import Text from '../Text/Text'; | ||
import MenuIcon from '~icons/material-symbols/menu'; | ||
import LogoIcon from '~icons/material-symbols/add-circle-outline'; | ||
import UndoIcon from '~icons/material-symbols/undo'; | ||
import RedoIcon from '~icons/material-symbols/redo'; | ||
import SettingsIcon from '~icons/material-symbols/settings'; | ||
import ScheduleTotalHoursAndCourses from '../ScheduleTotalHoursAndCourses/ScheduleTotalHoursAndCourses'; | ||
import CourseStatus from '../CourseStatus/CourseStatus'; | ||
|
||
const CalendarHeader = () => ( | ||
<div | ||
style={{ | ||
display: 'flex', | ||
minWidth: '672px', | ||
minHeight: '79px', | ||
padding: '15px 0px', | ||
justifyContent: 'space-between', | ||
alignItems: 'center', | ||
alignContent: 'center', | ||
rowGap: '10px', | ||
alignSelf: 'stretch', | ||
flexWrap: 'wrap', | ||
}} | ||
> | ||
<Button variant='single' icon={MenuIcon} color='ut-gray' /> | ||
|
||
<div style={{ display: 'flex', alignItems: 'center' }}> | ||
<LogoIcon style={{ marginRight: '5px' }} /> | ||
<Text>Your Logo Text</Text> | ||
</div> | ||
|
||
<ScheduleTotalHoursAndCourses scheduleName='SCHEDULE' totalHours={22} totalCourses={8} /> | ||
|
||
<CourseStatus size='small' status={Status.WAITLISTED} /> | ||
<CourseStatus size='small' status={Status.CLOSED} /> | ||
<CourseStatus size='small' status={Status.CANCELLED} /> | ||
|
||
<div style={{ display: 'flex' }}> | ||
<Button variant='outline' icon={UndoIcon} color='ut-black' /> | ||
<Button variant='outline' icon={RedoIcon} color='ut-black' /> | ||
</div> | ||
|
||
<Button variant='outline' icon={SettingsIcon} color='ut-black' /> | ||
|
||
<Divider type='solid' /> | ||
</div> | ||
); | ||
|
||
export default CalendarHeader; |
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