@react-av/editor
Version:
Editor Timeline Components built on React AV.
35 lines • 2.77 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;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TimelineOverflowContainer = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const Editor_1 = require("./Editor");
exports.TimelineOverflowContainer = (0, react_1.forwardRef)(function TimelineOverflowContainer(_a, ref) {
var _b;
var { componentRole = "timeline", className, style } = _a, props = __rest(_a, ["componentRole", "className", "style"]);
const { styling } = (0, Editor_1.useEditorContext)();
const containerStyle = componentRole === 'timeline' ? styling === null || styling === void 0 ? void 0 : styling.timelineReelContainer : styling === null || styling === void 0 ? void 0 : styling.timelineHeaderReelContainer;
return (0, jsx_runtime_1.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