UNPKG

react-d3-tree

Version:

React component to create interactive D3 tree hierarchies

60 lines (53 loc) 1.18 kB
// Importing CSS files globally (e.g. `import "./styles.css"`) can cause resolution issues with certain // libraries/frameworks. // Example: Next.js (https://github.com/vercel/next.js/blob/master/errors/css-npm.md) // // Since rd3t's CSS is bare bones to begin with, we provide all required styles as a template string, // which can be imported like any other TS/JS module and inlined into a `<style></style>` tag. export default ` /* Tree */ .rd3t-tree-container { width: 100%; height: 100%; } .rd3t-grabbable { cursor: move; /* fallback if grab cursor is unsupported */ cursor: grab; cursor: -moz-grab; cursor: -webkit-grab; } .rd3t-grabbable:active { cursor: grabbing; cursor: -moz-grabbing; cursor: -webkit-grabbing; } /* Node */ .rd3t-node { cursor: pointer; fill: #777; stroke: #000; stroke-width: 2; } .rd3t-leaf-node { cursor: pointer; fill: transparent; stroke: #000; stroke-width: 1; } .rd3t-label__title { fill: #000; stroke: none; font-weight: bolder; } .rd3t-label__attributes { fill: #777; stroke: none; font-weight: bolder; font-size: smaller; } /* Link */ .rd3t-link { fill: none; stroke: #000; } `;