@remotion/studio
Version:
APIs for interacting with the Remotion Studio
45 lines (44 loc) • 1.8 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorTitle = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const colors_1 = require("../../helpers/colors");
const react_overlay_1 = require("../react-overlay");
const DismissButton_1 = require("./DismissButton");
const ErrorMessage_1 = require("./ErrorMessage");
const Symbolicating_1 = require("./Symbolicating");
const title = {
marginBottom: 8,
display: 'flex',
flexDirection: 'row',
justifyContent: 'center',
};
const left = {
flex: 1,
paddingRight: 14,
fontWeight: 'bold',
maxWidth: '100%',
};
const errName = {
fontSize: 18,
color: colors_1.BLUE,
display: 'inline-block',
};
const row = {
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
};
const spacer = {
width: 5,
};
const ErrorTitle = ({ name, message, symbolicating, canHaveDismissButton }) => {
return (jsx_runtime_1.jsxs("div", { style: title, className: "css-reset", children: [
jsx_runtime_1.jsxs("div", { style: left, children: [
jsx_runtime_1.jsx("span", { style: errName, children: name }), jsx_runtime_1.jsx("br", {}), jsx_runtime_1.jsxs("div", { style: row, children: [symbolicating ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
jsx_runtime_1.jsx(Symbolicating_1.Symbolicating, {}), jsx_runtime_1.jsx("div", { style: spacer })
] })) : null, jsx_runtime_1.jsx(ErrorMessage_1.ErrorMessage, { message: message })
] })
] }), (0, react_overlay_1.didUnmountReactApp)() ? null : canHaveDismissButton ? (jsx_runtime_1.jsx(DismissButton_1.DismissButton, {})) : null] }));
};
exports.ErrorTitle = ErrorTitle;