Skip to content

Commit

Permalink
chore: switch to peer deps
Browse files Browse the repository at this point in the history
  • Loading branch information
lottamus authored and P0lip committed May 17, 2019
1 parent ef0a97b commit dcab6d1
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import "@stoplight/storybook-config/config";

import "../src/styles/_json-schema-viewer.scss";
import "../src/__stories__/_styles.scss";
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"node": ">=8.3.0"
},
"scripts": {
"build": "sl-scripts build && copyfiles -u 1 \"./src/styles/**/*.scss\" ./dist",
"build": "sl-scripts build",
"build.docs": "build-storybook -c .storybook -o docs-auto",
"commit": "git-cz",
"lint": "tslint -c tslint.json 'src/**/*.ts?'",
Expand All @@ -35,31 +35,36 @@
"test.watch": "yarn test --watch"
},
"peerDependencies": {
"@stoplight/markdown-viewer": "3.x.x",
"@stoplight/tree-list": "4.x.x",
"@stoplight/ui-kit": "2.x.x",
"lodash": "4.x.x",
"mobx": "5.x.x",
"react": ">=16.8",
"react-dom": ">=16.8"
},
"dependencies": {
"@stoplight/json": "1.9.x",
"@stoplight/markdown-viewer": "3.0.0-beta.4",
"@stoplight/tree-list": "^4.0.0",
"@types/json-schema": "^7.0.3",
"classnames": "^2.2.6",
"lodash": "^4.17.11",
"mobx-react-lite": "^1.3.1",
"pluralize": "^7.0.0",
"json-schema-merge-allof": "^0.6.0",
"react-error-boundary": "^1.2.5"
},
"devDependencies": {
"lodash": "^4.17.11",
"@stoplight/markdown-viewer": "^3.0.0-beta.4",
"@stoplight/tree-list": "^4.0.0",
"@stoplight/ui-kit": "^2.0.0",
"@sambego/storybook-state": "^1.3.4",
"@stoplight/scripts": "5.1.0",
"@stoplight/storybook-config": "^2.0.1",
"@stoplight/storybook-config": "^2.0.2",
"@stoplight/types": "4.1.0",
"@stoplight/ui-kit": "2.0.0",
"@types/classnames": "^2.2.7",
"@types/enzyme": "3.9.1",
"@types/jest": "^24.0.12",
"@types/json-schema": "^7.0.3",
"@types/node": "^11.13.8",
"@types/pluralize": "^0.0.29",
"@types/react": "16.8.12",
"@types/react-dom": "16.8.3",
Expand Down
2 changes: 2 additions & 0 deletions src/__stories__/_styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "~@stoplight/tree-list/styles/_tree-list.scss";
@import "~@stoplight/ui-kit/styles/_ui-kit.scss";
13 changes: 3 additions & 10 deletions src/components/SchemaTree.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RendererFunc, TreeList, TreeListEvents, TreeStore } from '@stoplight/tree-list';
import { TreeList, TreeListEvents, TreeStore } from '@stoplight/tree-list';
import { Omit } from '@stoplight/types';

import * as cn from 'classnames';
Expand Down Expand Up @@ -64,7 +64,7 @@ export const SchemaTree = observer<ISchemaTree>(props => {
treeStore,
};

const rowRenderer = React.useCallback<RendererFunc>(node => <SchemaRow node={node} {...itemData} />, [itemData]);
const rowRenderer = React.useCallback(node => <SchemaRow node={node} {...itemData} />, [itemData]);

return (
<div className={cn(className, 'flex flex-col h-full w-full')} {...rest}>
Expand All @@ -76,14 +76,7 @@ export const SchemaTree = observer<ISchemaTree>(props => {

<DetailDialog treeStore={treeStore} />

<TreeList
className="flex-1"
striped
rowHeight={ROW_HEIGHT}
canDrag={canDrag}
store={treeStore}
rowRenderer={rowRenderer}
/>
<TreeList rowHeight={ROW_HEIGHT} canDrag={canDrag} store={treeStore} rowRenderer={rowRenderer} />
</div>
);
});
Expand Down
2 changes: 0 additions & 2 deletions src/styles/_json-schema-viewer.scss
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
@import "~@stoplight/tree-list/styles/_tree-list.scss";
@import "~@stoplight/ui-kit/styles/_ui-kit.scss";
Loading

0 comments on commit dcab6d1

Please sign in to comment.