@shopgate/engage
Version:
Shopgate's ENGAGE library.
56 lines (55 loc) • 1.24 kB
JavaScript
import React from 'react';
import { makeStyles } from '@shopgate/engage/styles';
import { usePlaceholderWidget } from "./hooks";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
const useStyles = makeStyles()(theme => ({
root: {
padding: theme.spacing(2),
minHeight: 200
},
name: {
fontSize: 14
},
pre: {
background: '#f7f9fc',
border: '1px solid #dbdde2',
borderRadius: 8,
color: '#000',
fontSize: 10,
overflowY: 'auto',
padding: theme.spacing(1)
}
}));
/**
* The PlaceholderWidget component is used to display a placeholder for widget types that
* are not implemented yet.
* @returns {JSX.Element}
*/
const PlaceholderWidget = () => {
const {
classes
} = useStyles();
const {
code,
name,
config,
layout,
visibility
} = usePlaceholderWidget();
return /*#__PURE__*/_jsxs("div", {
className: classes.root,
children: [/*#__PURE__*/_jsx("div", {
className: classes.name,
children: name
}), /*#__PURE__*/_jsx("pre", {
className: classes.pre,
children: JSON.stringify({
code,
config,
layout,
visibility
}, null, 2)
})]
});
};
export default PlaceholderWidget;