feat(node-toolbar): remove css from node-toolbar component, set version to 1.0.0

This commit is contained in:
Christopher Möller
2022-11-17 09:59:28 +01:00
parent 1841dfa2ca
commit b31d8e9dc2
4 changed files with 4 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@reactflow/node-toolbar",
"version": "0.0.1",
"version": "1.0.0",
"description": "A toolbar component for React Flow that can be attached to a node.",
"keywords": [
"react",
@@ -31,9 +31,7 @@
},
"scripts": {
"dev": "concurrently \"rollup --config node:@reactflow/rollup-config --watch\" pnpm:css-watch",
"build": "rollup --config node:@reactflow/rollup-config --environment NODE_ENV:production && npm run css",
"css": "postcss src/*.css --config ../../tooling/postcss-config/postcss.config.js --dir dist",
"css-watch": "pnpm css --watch",
"build": "rollup --config node:@reactflow/rollup-config --environment NODE_ENV:production",
"lint": "eslint --ext .js,.jsx,.ts,.tsx src",
"typecheck": "tsc --noEmit"
},

View File

@@ -82,8 +82,9 @@ function NodeToolbar({
const nodeRect: Rect = getRectOfNodes([node], nodeOrigin);
const wrapperStyle: CSSProperties = {
position: 'absolute',
transform: getTransform(nodeRect, transform, position, offset),
zIndex: node[internalsSymbol]?.z,
zIndex: (node[internalsSymbol]?.z || 1) + 1,
...style,
};

View File

@@ -1,4 +0,0 @@
.react-flow__node-toolbar {
position: absolute;
z-index: 1000;
}

View File

@@ -1,4 +1,3 @@
@import '@reactflow/core/dist/style.css';
@import '@reactflow/controls/dist/style.css';
@import '@reactflow/minimap/dist/style.css';
@import '@reactflow/node-toolbar/dist/style.css';