Overlay transition
This commit is contained in:
1 parent
a597a0d061
commit
f96b495b38
2 files changed
+57
-31
No files matched your search
@@ -98,32 +98,30 @@ export const Menu: React.FC<IMenuProps> = props => {
|
||||
</li>
|
||||
))}
|
||||
|
||||
{!open ? null : (
|
||||
<Overlay
|
||||
opacity={1}
|
||||
onClickOverlay={onClick}
|
||||
>
|
||||
<div style={{
|
||||
width: '50%',
|
||||
margin: '50px auto',
|
||||
}}>
|
||||
{props.items.map((item, index) => (
|
||||
<li key={index}
|
||||
className={cx(
|
||||
item.color, {
|
||||
selected: item.highlighted,
|
||||
})}
|
||||
>
|
||||
<MenuItem
|
||||
url={itemUrl(item.url)}
|
||||
text={item.text}
|
||||
active={item.active}
|
||||
/>
|
||||
</li>
|
||||
))}
|
||||
</div>
|
||||
</Overlay>
|
||||
)}
|
||||
<Overlay
|
||||
show={open}
|
||||
onClickOverlay={onClick}
|
||||
>
|
||||
<div style={{
|
||||
width: '50%',
|
||||
margin: '50px auto',
|
||||
}}>
|
||||
{props.items.map((item, index) => (
|
||||
<li key={index}
|
||||
className={cx(
|
||||
item.color, {
|
||||
selected: item.highlighted,
|
||||
})}
|
||||
>
|
||||
<MenuItem
|
||||
url={itemUrl(item.url)}
|
||||
text={item.text}
|
||||
active={item.active}
|
||||
/>
|
||||
</li>
|
||||
))}
|
||||
</div>
|
||||
</Overlay>
|
||||
</menu>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user