-
-
Notifications
You must be signed in to change notification settings - Fork 962
Create calendar react-play #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cde03c9
Create calendar react-play
vincentBCP bb38123
Update Readme.md
vincentBCP dee87b2
[plays/calendar] Remove unnecessary use of useCallback
vincentBCP 898b629
[plays/calendar] Add more dummy data
vincentBCP 698bfc1
[plays/calendar] Use unique classname and fix UI mobile issue
vincentBCP e1b4fab
[plays/calendar] Update Readme.md
vincentBCP 7d276da
[plays/calendar] Add time validation
vincentBCP 001c4d3
[plays/calendar] Tweak stylings and refactor code
vincentBCP 88f101b
Merge branch 'main' into main
vincentBCP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,324 @@ | ||
| $calendar-box-shadow: 0px 0px 10px 5px rgba(0,0,0,0.1); | ||
|
|
||
| .calendar { | ||
| background-color: white; | ||
| padding: 30px; | ||
| } | ||
|
|
||
| .calendar-navigation { | ||
| display: flex; | ||
| align-items: center; | ||
| margin-bottom: 30px; | ||
|
|
||
| button { | ||
| background-color: transparent; | ||
| border: 1px solid lightgray; | ||
| border-radius: 5px; | ||
| font-size: 14px; | ||
| padding: 10px 15px; | ||
| font-weight: 500; | ||
| margin-right: 20px; | ||
| } | ||
|
|
||
| .calendar-navigation-arrow { | ||
| width: 35px; | ||
| height: 35px; | ||
| display: inline-flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| border-radius: 50%; | ||
| font-size: 28px; | ||
| cursor: pointer; | ||
| padding-top: 3px; | ||
| } | ||
|
|
||
| .calendar-navigation-current-date { | ||
| font-size: 24px; | ||
| margin-left: 20px; | ||
| } | ||
|
|
||
| button, | ||
| .calendar-navigation-arrow { | ||
| &:hover { | ||
| background-color: rgba(0,0,0,0.05); | ||
| } | ||
|
|
||
| &:active { | ||
| background-color: darkgray; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .calendar-body { | ||
| display: grid; | ||
| grid-template-columns: repeat(7, minmax(0, 1fr)); | ||
| border-left: 1px solid lightgray; | ||
| border-bottom: 1px solid lightgray; | ||
| } | ||
|
|
||
| .calendar-day-tile { | ||
| height: 150px; | ||
| border-right: 1px solid lightgray; | ||
| border-top: 1px solid lightgray; | ||
|
|
||
| .calendar-week, | ||
| .calendar-day { | ||
| display: inline-block; | ||
| text-align: center; | ||
| width: 100%; | ||
| font-size: 12px; | ||
| } | ||
|
|
||
| .calendar-week { | ||
| text-transform: uppercase; | ||
| font-weight: 500; | ||
| color: gray; | ||
| } | ||
| } | ||
|
|
||
| .calendar-modal { | ||
| position: absolute; | ||
koustov marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| top: 0; | ||
| left: 0; | ||
| width: 100%; | ||
| height: 100%; | ||
| padding-top: 120px; | ||
| z-index: 999; | ||
|
|
||
| .calendar-modal-content { | ||
| width: 500px; | ||
| margin: auto; | ||
| background-color: white; | ||
| padding: 30px 30px 30px 30px; | ||
| border-radius: 5px; | ||
| box-shadow: $calendar-box-shadow; | ||
|
|
||
| & > div:first-of-type { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| margin-bottom: 20px; | ||
|
|
||
| span:last-of-type { | ||
| cursor: pointer; | ||
| margin-left: auto; | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .calendar-event-form { | ||
| input[name='title'] { | ||
| width: 100%; | ||
| border: none; | ||
| border-bottom: 1px solid lightgray; | ||
| font-size: 18px; | ||
| outline: none; | ||
| padding-bottom: 5px; | ||
| margin-bottom: 20px; | ||
| } | ||
|
|
||
| p { | ||
| font-size: 14px; | ||
| color: gray; | ||
| } | ||
|
|
||
| & > div:first-of-type { | ||
| display: flex; | ||
| gap: 30px; | ||
|
|
||
| div { | ||
| width: 50%; | ||
|
|
||
| label { | ||
| display: block; | ||
| color: gray; | ||
| font-size: 14px; | ||
| } | ||
|
|
||
| input { | ||
| width: 100%; | ||
| outline: none; | ||
| border: none; | ||
| border-bottom: 1px solid lightgray; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| & > div:last-of-type { | ||
| display: flex; | ||
| justify-content: flex-end; | ||
| gap: 15px; | ||
| margin-top: 40px; | ||
|
|
||
| button { | ||
| min-width: 80px; | ||
| padding: 10px; | ||
| border: none; | ||
| outline: none; | ||
| border-radius: 5px; | ||
| font-weight: 500; | ||
| transition-duration: 0.3s; | ||
|
|
||
| &.delete { | ||
| background-color: transparent; | ||
| margin-right: auto; | ||
| color: red; | ||
|
|
||
| &:hover { | ||
| background-color: #ffe3e3; | ||
| } | ||
|
|
||
| &:active { | ||
| background-color: #ffcaca; | ||
| } | ||
| } | ||
|
|
||
| &.close { | ||
| background-color: transparent; | ||
|
|
||
| &:hover { | ||
| background-color: rgba(0,0,0,0.05); | ||
| } | ||
|
|
||
| &:active { | ||
| background-color: rgba(0,0,0,0.2); | ||
| } | ||
| } | ||
|
|
||
| &.save { | ||
| color: white; | ||
| background-color: #1a73e8; | ||
|
|
||
| &:hover { | ||
| background-color: #1a84e8; | ||
| } | ||
|
|
||
| &:active { | ||
| background-color: #1aa7e8; | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .calendar-event-info { | ||
| p:first-of-type { | ||
| font-size: 18px; | ||
| } | ||
|
|
||
| div { | ||
| text-align: right; | ||
|
|
||
| button { | ||
| min-width: 80px; | ||
| padding: 10px; | ||
| border: none; | ||
| outline: none; | ||
| border-radius: 5px; | ||
| font-weight: 500; | ||
| transition-duration: 0.3s; | ||
|
|
||
| &:hover { | ||
| background-color: rgba(0,0,0,0.1); | ||
| } | ||
|
|
||
| &:active { | ||
| background-color: rgba(0,0,0,0.2); | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .calendar-events { | ||
| margin-top: 5px; | ||
| } | ||
|
|
||
| .calendar-events-more { | ||
| padding: 3px 10px; | ||
| display: block; | ||
| cursor: pointer; | ||
| position: relative; | ||
|
|
||
| &:hover { | ||
| background-color: rgba(0,0,0,0.05); | ||
| } | ||
|
|
||
| & > span { | ||
| font-weight: 600; | ||
| font-size: 12px; | ||
| } | ||
|
|
||
| .calendar-events-more-popup { | ||
| display: none; | ||
| position: absolute; | ||
| left: -200px; | ||
| top: -200%; | ||
| width: 200px; | ||
| background-color: white; | ||
| padding: 20px 10px; | ||
| border-radius: 5px; | ||
| box-shadow: $calendar-box-shadow; | ||
| overflow: auto; | ||
| max-height: 200px; | ||
|
|
||
| & > div:first-of-type { | ||
| display: flex; | ||
| flex-direction: column; | ||
| align-items: center; | ||
| margin-bottom: 10px; | ||
|
|
||
| span { | ||
| &:first-of-type { | ||
| font-size: 14px; | ||
| color: gray; | ||
| text-transform: uppercase; | ||
| } | ||
|
|
||
| &:last-of-type { | ||
| font-size: 20px; | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| &:hover { | ||
| .calendar-events-more-popup { | ||
| display: block; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .calendar-event { | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 7px; | ||
| overflow: hidden; | ||
| cursor: pointer; | ||
| padding: 3px 10px; | ||
| transition-duration: 0.3s; | ||
|
|
||
| &:hover { | ||
| background-color: rgba(0,0,0,0.05); | ||
| } | ||
|
|
||
| div { | ||
| width: 10px; | ||
| height: 10px; | ||
| border-radius: 50%; | ||
| background-color: #1a73e8; | ||
| flex-shrink: 0; | ||
| } | ||
|
|
||
| span { | ||
| font-size: 12px; | ||
| white-space: nowrap; | ||
|
|
||
| &:last-of-type { | ||
| font-weight: 500; | ||
| flex-grow: 1; | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.