-
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.
- Loading branch information
Showing
11 changed files
with
128 additions
and
76 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,23 @@ | ||
import './style.scss' | ||
import React from "react"; | ||
import {useStateIfMounted} from "use-state-if-mounted"; | ||
|
||
interface Props {} | ||
function Helper(props: Props) { | ||
const [flag, setFlag] = useStateIfMounted(false); | ||
|
||
return(<section className={'helper'} > | ||
{flag && <div className={'helper-menu border'}> | ||
<div tabIndex={-1} onClick={e => alert('ok1')} className={'helper-item'}>Test 1</div> | ||
<div tabIndex={-1} onClick={e => alert('ok2')} className={'helper-item'}>Test 2</div> | ||
<hr /> | ||
<div tabIndex={-1} onClick={e => setFlag(false)} className={'text-danger helper-item'}>Close</div> | ||
</div>} | ||
<div tabIndex={-1} onClick={e => setFlag(!flag)} | ||
className={'helper-icon bg-dark circle border d-flex justify-content-center align-items-center'}> | ||
<label style={{cursor: 'pointer'}} className={'text-white'}>?</label> | ||
</div> | ||
</section>) | ||
} | ||
|
||
export default Helper; |
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,36 @@ | ||
.helper { | ||
position: absolute; | ||
z-index: 999; | ||
bottom: 0; right: 0; | ||
margin: 1rem; | ||
} | ||
|
||
.helper-menu { | ||
display: block; | ||
background-color: white; | ||
margin-bottom: 2rem; | ||
} | ||
|
||
.helper-item { | ||
cursor: pointer; | ||
display: block; | ||
width: 100%; | ||
clear: both; | ||
font-weight: 400; | ||
text-align: inherit; | ||
text-decoration: none; | ||
white-space: nowrap; | ||
background-color: transparent; | ||
border: 0; | ||
padding: 0.25rem 3rem 0.25rem 1rem; | ||
} | ||
.helper-item:hover { | ||
background-color: #F1F1F1; | ||
} | ||
|
||
.helper-icon { | ||
cursor: pointer; | ||
width: 1.5rem; height: 1.5rem; | ||
position: absolute; | ||
bottom: 0; right: 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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.