diff --git a/README.md b/README.md index ad4ac0fa..91e7b1b0 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,12 @@ React component used to render charts based on any sources you need npm i --save-dev @gravity-ui/chartkit @gravity-ui/uikit ``` +Make sure you have `@gravity-ui/uikit` styles enabled in your project. + +```typescript +import '@gravity-ui/uikit/styles/styles.scss'; +``` + ## Usage ```typescript @@ -15,6 +21,8 @@ import {ThemeProvider} from '@gravity-ui/uikit'; import ChartKit, {settings} from '@gravity-ui/chartkit'; import {YagrPlugin, YagrWidgetData} from '@gravity-ui/chartkit/build/plugins'; +import '@gravity-ui/uikit/styles/styles.scss'; + settings.set({plugins: [YagrPlugin]}); const data: YagrWidgetData = { diff --git a/src/components/ChartKit.tsx b/src/components/ChartKit.tsx index 0dbaf0c7..f007f7f5 100644 --- a/src/components/ChartKit.tsx +++ b/src/components/ChartKit.tsx @@ -7,7 +7,6 @@ import type {ChartKitType, ChartKitRef, ChartKitWidgetRef, ChartKitProps} from ' import {ErrorBoundary} from './ErrorBoundary/ErrorBoundary'; import {Loader} from './Loader/Loader'; -import '@gravity-ui/uikit/styles/styles.scss'; import './ChartKit.scss'; const b = block('chartkit');