@react-av/editor
Version:
Editor Timeline Components built on React AV.
32 lines • 2.62 kB
JavaScript
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import { useEditorContext } from "./Editor";
export const TimelineOverflowContainer = forwardRef(function TimelineOverflowContainer(_a, ref) {
var _b;
var { componentRole = "timeline", className, style } = _a, props = __rest(_a, ["componentRole", "className", "style"]);
const { styling } = useEditorContext();
const containerStyle = componentRole === 'timeline' ? styling === null || styling === void 0 ? void 0 : styling.timelineReelContainer : styling === null || styling === void 0 ? void 0 : styling.timelineHeaderReelContainer;
return _jsx("div", Object.assign({ ref: ref }, props, { className: [
className ? className : '',
typeof containerStyle === 'string' ? containerStyle : '',
typeof (styling === null || styling === void 0 ? void 0 : styling.timelineBaseReelContainer) === 'string' ? styling.timelineBaseReelContainer : ''
].join(' '), style: Object.assign(Object.assign(Object.assign(Object.assign({}, (typeof (styling === null || styling === void 0 ? void 0 : styling.timelineBaseReelContainer) === 'string' ? {} : styling === null || styling === void 0 ? void 0 : styling.timelineBaseReelContainer)), (typeof containerStyle === 'string' ? {} : containerStyle)), style), { overflow: 'hidden', userSelect: 'none', touchAction: 'none', position: 'relative', height: componentRole === 'timeline'
? 'calc(40px + 40px * var(--lines, 0) - 0.5rem * var(--lines, 0))'
: typeof containerStyle === 'string'
? typeof (styling === null || styling === void 0 ? void 0 : styling.timelineHeaderReelContainer) === 'string'
? undefined
: (_b = styling === null || styling === void 0 ? void 0 : styling.timelineHeaderReelContainer) === null || _b === void 0 ? void 0 : _b.height
: containerStyle === null || containerStyle === void 0 ? void 0 : containerStyle.height }), children: props.children }));
});
//# sourceMappingURL=TimelineOverflowContainer.js.map