Skip to content

Commit

Permalink
Revert "add isMobile property (#55)" (#56)
Browse files Browse the repository at this point in the history
This reverts commit 7ec399a.
  • Loading branch information
korvin89 authored Nov 8, 2022
1 parent 7ec399a commit 9d0dd26
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/components/ChartKit.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
.chartkit {
height: 100%;
width: 100%;

&_mobile .chartkit-scrollable-node {
max-height: 3000px;
}
}
4 changes: 2 additions & 2 deletions src/components/ChartKit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type ChartKitComponentProps<T extends ChartkitType> = Omit<ChartKitProps<T>, 'on

const ChartKitComponent = <T extends ChartkitType>(props: ChartKitComponentProps<T>) => {
const widgetRef = React.useRef<ChartKitWidgetRef>();
const {instanceRef, id = getRandomCKId(), type, data, onLoad, isMobile, ...restProps} = props;
const {instanceRef, id = getRandomCKId(), type, data, onLoad, ...restProps} = props;
const lang = settings.get('lang');
const plugins = settings.get('plugins');
const plugin = plugins.find((iteratedPlugin) => iteratedPlugin.type === type);
Expand Down Expand Up @@ -46,7 +46,7 @@ const ChartKitComponent = <T extends ChartkitType>(props: ChartKitComponentProps

return (
<React.Suspense fallback={<Loader />}>
<div className={b({mobile: isMobile})}>
<div className={b()}>
<ChartComponent
ref={widgetRef}
id={id}
Expand Down
1 change: 0 additions & 1 deletion src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export type ChartKitProps<T extends ChartkitType> = {
type: T;
data: ChartkitWidget[T]['data'];
id?: string;
isMobile?: boolean;
onLoad?: (data?: ChartKitOnLoadData<T>) => void;
onError?: ChartKitOnError;
formatNumber?: ChartKitFormatNumber;
Expand Down

0 comments on commit 9d0dd26

Please sign in to comment.