-
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.
- Loading branch information
Showing
46 changed files
with
136 additions
and
35 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 { useEffect, useRef, useState } from 'react'; | ||
import { LayoutCol1 } from '@/Layouts'; | ||
import { Title } from '@/Components'; | ||
import styles from './styles.module.scss'; | ||
|
||
const EventPage = () => { | ||
return ( | ||
<LayoutCol1 baseClassName={styles.page}> | ||
<Title title='Event Capture' titleColor='#777' /> | ||
|
||
<Div areaName='A area' areaClass={styles.area_a}> | ||
<Div areaName='B area' areaClass={styles.area_b}> | ||
<Div areaName='C area' areaClass={styles.area_c} /> | ||
</Div> | ||
</Div> | ||
</LayoutCol1> | ||
); | ||
}; | ||
|
||
export default EventPage; | ||
|
||
const Div = ({ areaName, areaClass, children }) => { | ||
const ref = useRef(0); | ||
|
||
const [clickNum, setClickNum] = useState(0); | ||
const [isShow, setIsShow] = useState(false); | ||
const hintClass = isShow ? styles.hintShow : styles.hintHide; | ||
|
||
useEffect(() => { | ||
if (!ref.current || !clickNum) { | ||
ref.current += 1; | ||
} else { | ||
setIsShow(true); | ||
setTimeout(() => setIsShow(false), 1000); | ||
} | ||
}, [clickNum]); | ||
|
||
return ( | ||
<div | ||
className={areaClass} | ||
onClick={() => setClickNum(prev => prev + 1)} | ||
role='button' | ||
tabIndex={0} | ||
> | ||
<div> | ||
<span>{areaName}</span> | ||
<span className={hintClass}>+1</span> | ||
</div> | ||
<p>Clicked Times : {clickNum}</p> | ||
{children} | ||
</div> | ||
); | ||
}; |
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,78 @@ | ||
.page { | ||
position: relative; | ||
background: #dedede; | ||
} | ||
|
||
%area { | ||
cursor: pointer; | ||
|
||
display: flex; | ||
flex-direction: column; | ||
gap: 2rem; | ||
|
||
width: 100%; | ||
padding: 2rem; | ||
|
||
border-radius: 1rem; | ||
box-shadow: 0 0 1rem 0 rgba($color: #000, $alpha: 20%); | ||
|
||
& div:first-child { | ||
display: flex; | ||
gap: 1rem; | ||
align-items: center; | ||
|
||
& span:first-child { | ||
padding: 0.5rem 1rem; | ||
color: #346a6d; | ||
background-color: #fff; | ||
border-radius: 1rem; | ||
} | ||
} | ||
|
||
& p { | ||
width: fit-content; | ||
font-weight: 500; | ||
color: #fff; | ||
|
||
&:first-child { | ||
width: fit-content; | ||
} | ||
} | ||
} | ||
|
||
.area { | ||
&_a { | ||
@extend %area; | ||
|
||
background-color: #3d5a5b; | ||
} | ||
|
||
&_b { | ||
@extend %area; | ||
|
||
background-color: #677f7f; | ||
} | ||
|
||
&_c { | ||
@extend %area; | ||
|
||
background-color: #95aaab; | ||
} | ||
} | ||
|
||
%hint { | ||
color: #fff; | ||
transition: opacity 0.2s cubic-bezier(0, 0, 0.03, 0.98); | ||
} | ||
|
||
.hintShow { | ||
@extend %hint; | ||
|
||
opacity: 1; | ||
} | ||
|
||
.hintHide { | ||
@extend %hint; | ||
|
||
opacity: 0; | ||
} |
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