Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove direct import @gravity-ui/uikit styles in ChartKit component #80

Merged
merged 1 commit into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@ 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
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 = {
Expand Down
1 change: 0 additions & 1 deletion src/components/ChartKit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down