@neo4j-ndl/react
Version:
React implementation of Neo4j Design System
74 lines • 2.79 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.containerClasses = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
/**
*
* Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
const graph_visualization_1 = require("../graph-visualization");
const nodes = [
{
id: 'node1',
labels: ['Pokemon', 'Legendary'],
properties: {},
},
{
id: 'node2',
labels: ['Type'],
properties: { name: { stringified: 'Dragon', type: 'String' } },
},
{
id: 'node3',
labels: ['Type'],
properties: { name: { stringified: 'Flying', type: 'String' } },
},
];
const rels = [
{
from: 'node1',
id: 'rel1',
properties: {},
to: 'node2',
type: 'HAS_TYPE',
},
{
from: 'node1',
id: 'rel2',
properties: {},
to: 'node3',
type: 'HAS_TYPE',
},
];
exports.containerClasses = 'n-w-full n-border-palette-neutral-border-weak n-mx-2 n-rounded-lg n-border';
const Component = () => {
return ((0, jsx_runtime_1.jsx)("div", { style: { height: '600px' }, children: (0, jsx_runtime_1.jsx)(graph_visualization_1.GraphVisualization, { bottomLeftIsland: (0, jsx_runtime_1.jsx)("div", { children: "\u2199\uFE0F" }), bottomRightIsland: (0, jsx_runtime_1.jsx)("div", { children: "\u2198\uFE0F" }), nodes: nodes, rels: rels, sidepanel: {
children: (0, jsx_runtime_1.jsx)("div", { children: "Custom panel contents" }),
isSidePanelOpen: true,
onSidePanelResize: () => {
/* no op */
},
setIsSidePanelOpen: () => {
/* no op */
},
sidePanelWidth: 300,
}, topLeftIsland: (0, jsx_runtime_1.jsx)("div", { children: "\u2196\uFE0F" }), topRightIsland: (0, jsx_runtime_1.jsx)("div", { children: "\u2197\uFE0F" }), className: exports.containerClasses }) }));
};
exports.default = Component;
//# sourceMappingURL=graph-visualization-custom.story.js.map