mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 08:57:54 +00:00
New state colour/text when cannot drop New colour when okay to drop New bar in timeline grid when okay to drop Tracks that are okay to drop glow --------- Co-authored-by: Christopher Oliphant <RALifeCoach@users.noreply.github.com>
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import React from "react";
|
|
import { useMouseEventsTimeline } from "~/pages/PageEnigma/comps/Timeline/utils/useMouseEventsTimeline";
|
|
import { dndTimelineHeight, timelineHeight } from "~/pages/PageEnigma/store";
|
|
import useTimelineClick from "~/pages/PageEnigma/comps/Timeline/utils/useTimelineClick";
|
|
import { Pages } from "~/pages/PageEnigma/constants/page";
|
|
|
|
interface LowerPanelPropsI {
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
export const LowerPanel = ({ children }: LowerPanelPropsI) => {
|
|
const { onPointerDown } = useMouseEventsTimeline();
|
|
|
|
const displayHeight =
|
|
dndTimelineHeight.value > -1
|
|
? dndTimelineHeight.value
|
|
: timelineHeight.value;
|
|
|
|
const onTimelineClick = useTimelineClick(Pages.EDIT);
|
|
|
|
return (
|
|
<>
|
|
<div
|
|
className="absolute z-10 h-1 w-full cursor-ns-resize bg-ui-panel-border"
|
|
style={{ bottom: displayHeight }}
|
|
onPointerDown={onPointerDown}
|
|
/>
|
|
<div
|
|
className={["absolute bottom-0", "w-screen", "bg-ui-panel"].join(" ")}
|
|
style={{ height: displayHeight }}
|
|
onClick={onTimelineClick}>
|
|
{children}
|
|
</div>
|
|
</>
|
|
);
|
|
};
|