Skip to content

Commit 5f3d136

Browse files
committed
Fixed issue where styling of ButtonGroup breaks for other libraries that imported this library
1 parent 2c06a6c commit 5f3d136

File tree

4 files changed

+9
-17012
lines changed

4 files changed

+9
-17012
lines changed

package.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,20 @@
5151
"classnames": "^2.2.6",
5252
"react-dnd": "^10.0.2",
5353
"react-dnd-html5-backend": "^10.0.2",
54-
"react-dnd-multi-backend": "^5.0.1",
54+
"react-dnd-multi-backend": "^5.0.0",
5555
"react-dnd-touch-backend": "^10.0.2",
5656
"react-motion": "^0.5.2",
5757
"react-virtualized-auto-sizer": "^1.0.2",
5858
"react-window": "^1.8.5",
5959
"tslib": "^1.11.0"
6060
},
6161
"peerDependencies": {
62-
"@pdftron/webviewer": ">=8.1.0",
62+
"@pdftron/webviewer": ">=7.0.0",
6363
"react": ">=16.8.0",
6464
"react-dom": ">=16.8.0"
6565
},
6666
"devDependencies": {
6767
"@babel/core": "^7.7.4",
68-
"@babel/preset-env": "7.9.0",
6968
"@commitlint/cli": "^8.3.5",
7069
"@commitlint/config-conventional": "^8.3.4",
7170
"@commitlint/prompt-cli": "^8.3.5",
@@ -81,20 +80,17 @@
8180
"@storybook/preset-typescript": "^1.0.0",
8281
"@storybook/react": "6.0.0-alpha.26",
8382
"@storybook/storybook-deployer": "^2.8.1",
84-
"@types/anymatch": "^3.0.0",
85-
"@types/cheerio": "^0.22.30",
8683
"@types/classnames": "^2.2.9",
8784
"@types/copy-webpack-plugin": "^5.0.0",
88-
"@types/enzyme": "^3.10.7",
85+
"@types/enzyme": "^3.10.3",
8986
"@types/jest": "^25.1.2",
90-
"@types/mini-css-extract-plugin": "^1.2.1",
87+
"@types/mini-css-extract-plugin": "^0.9.0",
9188
"@types/node": "13.11.1",
9289
"@types/optimize-css-assets-webpack-plugin": "^5.0.1",
9390
"@types/react": "^16.9.23",
9491
"@types/react-dnd-multi-backend": "^6.0.0",
9592
"@types/react-dom": "^16.9.4",
9693
"@types/react-motion": "^0.0.29",
97-
"@types/react-redux": "^4.4.47",
9894
"@types/react-virtualized-auto-sizer": "^1.0.0",
9995
"@types/react-window": "^1.8.1",
10096
"@types/sinon": "^9.0.4",
@@ -146,7 +142,7 @@
146142
"typescript": "^3.7.3",
147143
"webpack": "^4.41.2",
148144
"webpack-cli": "^3.3.10",
149-
"webpack-node-externals": "^1.7.2"
145+
"webpack-node-externals": "^3.0.0"
150146
},
151147
"husky": {
152148
"hooks": {

src/components/ButtonGroup/_ButtonGroup.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.ui__buttonGroup {
2-
margin: calc(-1 * #{$padding-tiny});
2+
// do not mulply by -1 as it seems to cause issues for other libraries that uses this library
3+
margin: calc(1px - #{$padding-tiny} - 1px);
34
display: flex;
45
flex-wrap: wrap;
56

webpack.config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import OptimizeCSSAssetsPlugin from 'optimize-css-assets-webpack-plugin';
44
import path from 'path';
55
import TerserPlugin from 'terser-webpack-plugin';
66
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
7-
import webpack, { Plugin } from 'webpack';
7+
import webpack from 'webpack';
88
import nodeExternals from 'webpack-node-externals';
99

1010
export const BASE_URL = 'src';
@@ -24,7 +24,7 @@ const config: webpack.Configuration = {
2424
},
2525
externals: [nodeExternals()],
2626
plugins: [
27-
miniCssExtractPlugin as unknown as Plugin,
27+
miniCssExtractPlugin as any,
2828
new CopyPlugin([
2929
{
3030
from: `${BASE_URL}/styles/_variables.scss`,
@@ -51,7 +51,6 @@ const config: webpack.Configuration = {
5151
toplevel: true,
5252
},
5353
parallel: true,
54-
cache: true,
5554
}),
5655
new OptimizeCSSAssetsPlugin({}),
5756
],

0 commit comments

Comments
 (0)