change(ui) - resize player on event toggle
This commit is contained in:
parent
fee9119f23
commit
7a117da250
1 changed files with 6 additions and 2 deletions
|
|
@ -1,16 +1,20 @@
|
|||
import React from 'react'
|
||||
import { Icon, Popup } from 'UI'
|
||||
import { connectPlayer, toggleEvents } from 'Player';
|
||||
import { connectPlayer, toggleEvents, scale } from 'Player';
|
||||
import cn from 'classnames'
|
||||
import stl from './EventsToggleButton.css'
|
||||
|
||||
function EventsToggleButton({ showEvents, toggleEvents }) {
|
||||
const toggle = () => {
|
||||
toggleEvents()
|
||||
scale()
|
||||
}
|
||||
return (
|
||||
<Popup
|
||||
trigger={
|
||||
<button
|
||||
className={cn("absolute right-0 z-50", stl.wrapper)}
|
||||
onClick={toggleEvents}
|
||||
onClick={toggle}
|
||||
>
|
||||
<Icon
|
||||
name={ showEvents ? 'chevron-double-right' : 'chevron-double-left' }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue