UNPKG

lingo3d

Version:

Lingo3D is a React/Vue 3d game development framework that ships with a complete visual editor

21 lines 1.05 kB
import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime"; import AppBar from "../../component/bars/AppBar"; import Button from "./Button"; import useSyncState from "../../hooks/useSyncState"; import { getTimeline } from "../../../states/useTimeline"; import AddIcon from "../icons/AddIcon"; import { timelineContextMenuSignal } from "../TimelineContextMenu"; const TimelineBar = () => { const timeline = useSyncState(getTimeline); return (_jsxs(AppBar, { children: [_jsxs(Button, { onClick: (e) => (timelineContextMenuSignal.value = { x: e.clientX, y: e.clientY, create: "timeline" }), children: [_jsx(AddIcon, {}), "New timeline"] }), _jsxs(Button, { disabled: !timeline, onClick: (e) => (timelineContextMenuSignal.value = { x: e.clientX, y: e.clientY, create: "audio" }), children: [_jsx(AddIcon, {}), "Audio"] })] })); }; export default TimelineBar; //# sourceMappingURL=index.js.map