Initial commit & basic panel structure

This commit is contained in:
obergodmar
2020-06-22 02:16:38 +03:00
parent 8ad73c3c4c
commit 00e142bf09
32 changed files with 1682 additions and 610 deletions
@@ -0,0 +1,28 @@
import * as React from 'react'
import { useCallback } from 'react'
import './panel-component.scss'
interface Props {
orientation: 'bottom' | 'left'
isShown: boolean
setShown: () => void
}
export const PanelComponent = ({orientation, isShown, setShown}: Props) => {
const handleClick = useCallback((event) => {
event.preventDefault()
setShown()
}, [setShown])
return (
<div
className={`panel panel--${orientation} ${isShown ? `panel--${orientation}--shown` : ''}`}
>
<button onClick={handleClick}/>
</div>
)
}
PanelComponent.displayName = 'PanelComponent'