File tree Expand file tree Collapse file tree 5 files changed +12
-4
lines changed Expand file tree Collapse file tree 5 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 11import "@stoplight/storybook-config/config" ;
2+
3+ import "../src/styles/_json-schema-viewer.scss" ;
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ yarn add @stoplight/json-schema-viewer
2828### Usage
2929
3030``` jsx
31+ // index.jsx
3132import { JsonSchemaViewer } from " @stoplight/json-schema-viewer" ;
3233
3334< JsonSchemaViewer
@@ -41,6 +42,13 @@ import { JsonSchemaViewer } from "@stoplight/json-schema-viewer";
4142/ > ;
4243```
4344
45+ Also make sure you import the styles
46+
47+ ``` js
48+ // styles.scss
49+ import " ~@stoplight/json-schema-viewer/styles/_json-schema-viewer.scss" ;
50+ ```
51+
4452More examples can be find in the [ Storybook stories] ( ./src/__stories__/JsonSchemaViewer.tsx ) .
4553
4654### Contributing
Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ import * as React from 'react';
66import { isSchemaViewerEmpty , renderSchema } from '../utils' ;
77import { ISchemaTree , SchemaTree } from './SchemaTree' ;
88
9- import '../styles/main.scss' ;
10-
119export interface IJsonSchemaViewer extends Omit < ISchemaTree , 'treeStore' > {
1210 emptyText ?: string ;
1311 defaultExpandedDepth ?: number ;
Original file line number Diff line number Diff line change 1+ @import " ~@stoplight/tree-list/styles/_tree-list.scss" ;
2+ @import " ~@stoplight/ui-kit/styles/_ui-kit.scss" ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments