Skip to content

Commit

Permalink
Clean up chordial's internals
Browse files Browse the repository at this point in the history
  • Loading branch information
AriaMinaei committed Oct 15, 2023
1 parent 273585d commit 6e1f7fe
Show file tree
Hide file tree
Showing 8 changed files with 464 additions and 455 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import {usePrism, useVal} from '@theatre/react'
import type {ChodrialElement, ChordialOpts} from './chordialInternals'
import {contextActor, contextStatus} from './chordialInternals'
import {contextActor, contextStatus} from './contextActor'
import ContextMenu from '@theatre/studio/uiComponents/simpleContextMenu/ContextMenu/ContextMenu'
import {val} from '@theatre/dataverse'

Expand Down
8 changes: 3 additions & 5 deletions theatre/studio/src/uiComponents/chordial/TooltipOverlay.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type {ReactNode} from 'react'
import React from 'react'
import type {$IntentionalAny} from '@theatre/utils/types'
import {val} from '@theatre/dataverse'
Expand All @@ -7,12 +6,12 @@ import styled from 'styled-components'
import usePopoverPosition from '@theatre/studio/uiComponents/Popover/usePopoverPosition'
import {useTransition, animated, easings} from '@react-spring/web'
import {pointerEventsAutoInNormalMode} from '@theatre/studio/css'
import {tooltipTarget} from './chordialInternals'
import {tooltipTarget} from './tooltipActor'

export const TooltipOverlay: React.FC<{}> = () => {
const currentTarget = useVal(tooltipTarget)

const title = usePrism((): ReactNode => {
const title = usePrism((): React.ReactNode => {
const chordial = currentTarget
if (!chordial) return null
const a = chordial.atom
Expand All @@ -27,7 +26,7 @@ export const TooltipOverlay: React.FC<{}> = () => {

const data: Array<{
key: string
title: ReactNode
title: React.ReactNode
positioning: {left: number; top: number}
}> = []

Expand Down Expand Up @@ -72,7 +71,6 @@ export const TooltipOverlay: React.FC<{}> = () => {
>
<Title>{title}</Title>
<IconContainer>{theIcon}</IconContainer>
{title}
</Container>
)}

Expand Down
Loading

0 comments on commit 6e1f7fe

Please sign in to comment.