Removed the open/close button from r3f
This commit is contained in:
parent
d0c4dd4ec7
commit
532e24e691
3 changed files with 0 additions and 44 deletions
|
@ -13,7 +13,6 @@ import studio from '@theatre/studio'
|
|||
import {useVal} from '@theatre/dataverse-react'
|
||||
import {IdProvider} from './elements/IdProvider'
|
||||
import PortalManager from './elements/PortalManager'
|
||||
import Button from './elements/Button'
|
||||
|
||||
const EditorScene = () => {
|
||||
const orbitControlsRef = useRef<typeof OrbitControls>()
|
||||
|
@ -100,18 +99,6 @@ const Editor: VFC = () => {
|
|||
</>
|
||||
) : null}
|
||||
</div>
|
||||
{editorOpen || (
|
||||
<Button
|
||||
className="fixed bottom-5 left-5"
|
||||
onClick={() => {
|
||||
studio.transaction(({set}) => {
|
||||
set(editorObject.props.isOpen, true)
|
||||
})
|
||||
}}
|
||||
>
|
||||
Editor
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<style type="text/css">{styles}</style>
|
||||
|
|
|
@ -13,7 +13,6 @@ import studio from '@theatre/studio'
|
|||
import {getSelected} from './useSelected'
|
||||
import {useVal} from '@theatre/dataverse-react'
|
||||
import IconButton from './elements/IconButton'
|
||||
import Button from './elements/Button'
|
||||
|
||||
const UI: VFC = () => {
|
||||
const [editorObject] = useEditorStore(
|
||||
|
@ -135,18 +134,6 @@ const UI: VFC = () => {
|
|||
<ReferenceWindow height={referenceWindowSize} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Bottom-left corner*/}
|
||||
<Button
|
||||
className="absolute left-0 bottom-0 pointer-events-auto"
|
||||
onClick={() =>
|
||||
studio.transaction(({set}) => {
|
||||
set(editorObject.props.isOpen, false)
|
||||
})
|
||||
}
|
||||
>
|
||||
Close
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
import React, {forwardRef} from 'react'
|
||||
import type {ButtonProps} from 'reakit'
|
||||
import {Button as ButtonImpl} from 'reakit'
|
||||
|
||||
export type {ButtonProps}
|
||||
|
||||
const Button = forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => {
|
||||
return (
|
||||
<ButtonImpl
|
||||
// @ts-ignore
|
||||
ref={ref}
|
||||
{...props}
|
||||
className={`${props.className} inline-flex justify-center rounded-md px-4 py-2 font-medium bg-gray-100 text-gray-700 hover:bg-gray-200 focus:outline-none focus:ring focus:ring-blue-300`}
|
||||
/>
|
||||
)
|
||||
})
|
||||
|
||||
export default Button
|
Loading…
Reference in a new issue