Skip to content

Commit 8a16999

Browse files
lottamusP0lip
authored andcommitted
fix: scss imports
1 parent d4624c7 commit 8a16999

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

.storybook/config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
import "@stoplight/storybook-config/config";
2+
3+
import "../src/styles/_json-schema-viewer.scss";

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ yarn add @stoplight/json-schema-viewer
2828
### Usage
2929

3030
```jsx
31+
// index.jsx
3132
import { 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+
4452
More examples can be find in the [Storybook stories](./src/__stories__/JsonSchemaViewer.tsx).
4553

4654
### Contributing

src/components/JsonSchemaViewer.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import * as React from 'react';
66
import { isSchemaViewerEmpty, renderSchema } from '../utils';
77
import { ISchemaTree, SchemaTree } from './SchemaTree';
88

9-
import '../styles/main.scss';
10-
119
export interface IJsonSchemaViewer extends Omit<ISchemaTree, 'treeStore'> {
1210
emptyText?: string;
1311
defaultExpandedDepth?: number;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@import "~@stoplight/tree-list/styles/_tree-list.scss";
2+
@import "~@stoplight/ui-kit/styles/_ui-kit.scss";

src/styles/main.scss

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)