diff --git a/packages/components/package.json b/packages/components/package.json index b3d20d97..1cb55141 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -8,7 +8,6 @@ "@hookform/resolvers": "^2.8.10", "@quri/squiggle-lang": "^0.2.8", "@react-hook/size": "^2.1.2", - "@tailwindcss/forms": "^0.5.2", "lodash": "^4.17.21", "react": "^18.1.0", "react-ace": "^10.1.0", @@ -31,6 +30,7 @@ "@storybook/node-logger": "^6.5.6", "@storybook/preset-create-react-app": "^4.1.1", "@storybook/react": "^6.5.6", + "@tailwindcss/forms": "^0.5.2", "@testing-library/jest-dom": "^5.16.4", "@testing-library/react": "^13.3.0", "@testing-library/user-event": "^14.2.0", diff --git a/packages/components/src/components/DistributionChart.tsx b/packages/components/src/components/DistributionChart.tsx index 12a4cf1e..a83a2e44 100644 --- a/packages/components/src/components/DistributionChart.tsx +++ b/packages/components/src/components/DistributionChart.tsx @@ -45,6 +45,10 @@ export const DistributionChart: React.FC = ({ shape.value.discrete.some((x) => x.x <= 0); let spec = buildVegaSpec(isLogX, isExpY); let widthProp = width ? width : size.width; + if (widthProp < 20) { + console.warn(`Width of Distribution is set to ${widthProp}, which is too small`) + widthProp = 20 + } // Check whether we should disable the checkbox var logCheckbox = (