Skip to content

Commit

Permalink
fix: fix yagr theme initialization (#59)
Browse files Browse the repository at this point in the history
fix: fix yagr theme ininitialization
  • Loading branch information
korvin89 authored Nov 14, 2022
1 parent e7afeb4 commit 7247873
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@gravity-ui/prettier-config": "^1.0.1",
"@gravity-ui/stylelint-config": "^1.0.1",
"@gravity-ui/tsconfig": "^1.0.0",
"@gravity-ui/uikit": "^3.0.2",
"@gravity-ui/uikit": "^3.5.0",
"@storybook/addon-essentials": "^6.5.9",
"@storybook/addon-knobs": "^6.4.0",
"@storybook/preset-scss": "^1.0.3",
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/yagr/renderer/YagrWidget.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import moment from 'moment';
import debounce from 'lodash/debounce';
import {useThemeValue} from '@gravity-ui/uikit';
import {useThemeType} from '@gravity-ui/uikit';
import YagrComponent, {YagrChartProps} from 'yagr/dist/react';
import {
YagrConfig,
Expand Down Expand Up @@ -117,7 +117,7 @@ const YagrWidget = React.forwardRef<ChartKitWidgetRef | undefined, YagrWidgetPro

const {data, libraryConfig} = props.data;
const {id, onLoad} = props;
const theme = useThemeValue() as YagrConfig['settings']['theme'];
const theme = useThemeType() as YagrConfig['settings']['theme'];

const handlers: Record<string, null | ((event: MouseEvent) => void)> = {
mouseMove: null,
Expand Down

0 comments on commit 7247873

Please sign in to comment.