15 |
16 | {props.title}
17 |
18 |
19 | {small ? null :
{props.subTitle}}
20 | {props.children ? (
21 |
29 | {props.children}
30 |
31 | ) : null}
32 |
33 | {props.connectedWarning ?
: null}
34 | {props.brokerFeatureWarning ? (
35 |
36 | Feature is not available
37 | Make sure that the connected broker has {props.brokerFeatureWarning} enabled.
38 |
39 | ) : null}
40 | {props.featureWarning ? (
41 |
42 | Premium feature
43 | {props.featureWarning} is a premium feature. For more information visit{' '}
44 |
45 | cedalo.com
46 | {' '}
47 | or contact us at{' '}
48 |
49 | info@cedalo.com
50 |
51 | .
52 |
53 | ) : null}
54 | {props.warnings &&
55 | !props.featureWarning &&
56 | props.warnings()?.map((warning) => (
57 |
58 | {warning.title}
59 | {warning.error}
60 |
61 | ))}
62 |
63 | );
64 | }
65 |
--------------------------------------------------------------------------------
/frontend/src/components/ContentContainer.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ContainerBox from './ContainerBox';
3 | import ContainerBreadCrumbs from './ContainerBreadCrumbs';
4 |
5 | const getHeaderContent = (children) => {
6 | children = children.length ? children : children.props && children.props.children;
7 | const [header, content] = children?.length ? children : [children];
8 | return { header: content && header, content: content || header };
9 | };
10 | const ContentContainer = ({ children, breadCrumbs, dataTour, overFlowX, overFlowY = 'auto' }) => {
11 | // expecting header and content
12 | const { header, content } = getHeaderContent(children);
13 |
14 | return (
15 |