-
Notifications
You must be signed in to change notification settings - Fork 40
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
19 changed files
with
147 additions
and
151 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.icon { | ||
display: flex; | ||
flex-direction: row; | ||
|
||
.vertical { | ||
flex-direction: column; | ||
} | ||
} | ||
|
||
.tooltipWrapper { | ||
white-space: nowrap; | ||
} |
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,45 @@ | ||
@import '../../style/mixins.scss'; | ||
|
||
.menu_item { | ||
box-shadow: 0px 0px 13px #ffffff54; | ||
opacity: 1; | ||
background-color: #101010; | ||
border-radius: 50%; | ||
width: 38px; | ||
height: 38px; | ||
justify-content: center; | ||
align-items: center; | ||
display: flex; | ||
} | ||
|
||
.menu_item.active { | ||
border: 1px solid #ffffff6b; | ||
box-shadow: 0px 0px 8px #ffffff4d inset, 0px 0px 13px #ffffff4d; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.itemContainer { | ||
position: inherit; | ||
display: flex; | ||
} | ||
|
||
|
||
.icon { | ||
width: 30px; | ||
height: 30px; | ||
object-fit: fill; | ||
border-radius: 50%; | ||
} | ||
|
||
.external { | ||
display: block; | ||
position: absolute; | ||
bottom: 0; | ||
right: 0; | ||
transform: translate(50%, 50%); | ||
width: 20px; | ||
height: 20px; | ||
|
||
@include withShareIcon; | ||
} |
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,30 +1,30 @@ | ||
import { NavLink } from 'react-router-dom'; | ||
import cx from 'classnames'; | ||
import styles from './CircularMenu.module.scss'; | ||
import { MenuItem } from 'src/types/menu'; | ||
import styles from './CircularMenuItem.module.scss'; | ||
|
||
interface Props { | ||
item: MenuItem; | ||
onClick: () => void; | ||
selected: boolean; | ||
} | ||
|
||
const CircularMenuItem = ({ item, onClick, selected }: Props) => { | ||
function CircularMenuItem({ item, onClick, selected }: Props) { | ||
const isExternal = item.to.startsWith('http'); | ||
|
||
return ( | ||
<div className={cx(styles.menu_item, { [styles.active]: selected })}> | ||
<NavLink | ||
to={item.to} | ||
onClick={onClick} | ||
style={{ position: 'inherit' }} | ||
className={styles.itemContainer} | ||
{...(isExternal && { target: '_blank', rel: 'noreferrer noopener' })} | ||
> | ||
<img src={item.icon} className={styles.icon} alt="img" /> | ||
{isExternal && <span className={styles.external}></span>} | ||
{isExternal && <span className={styles.external} />} | ||
</NavLink> | ||
</div> | ||
); | ||
}; | ||
} | ||
|
||
export default CircularMenuItem; |
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
Oops, something went wrong.