Skip to content

Commit

Permalink
fix: rollup mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
severinlandolt committed Nov 3, 2024
1 parent b2a1f0e commit c681b69
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 0 additions & 2 deletions rollup.config.js → rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-undef */
import commonjs from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import typescript from "@rollup/plugin-typescript";
Expand Down
4 changes: 2 additions & 2 deletions src/components/text-elements/Legend/Legend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,15 @@ const Legend = React.forwardRef<HTMLOListElement, LegendProps>((props, ref) => {
setIsKeyDowned(null);
scrollToTest("left");
}}
disabled={!hasScroll?.left ?? true}
disabled={!hasScroll?.left}
/>
<ScrollButton
icon={ChevronRightFill}
onClick={() => {
setIsKeyDowned(null);
scrollToTest("right");
}}
disabled={!hasScroll?.right ?? true}
disabled={!hasScroll?.right}
/>
</div>
</>
Expand Down
4 changes: 2 additions & 2 deletions src/stories/chart-elements/AreaChart.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export const CustomTooltipPreviousDay: Story = {
const previousIndex = data.findIndex((e) => e[customTooltipIndex] === label);
const previousValues: any = previousIndex > 0 ? data[previousIndex - 1] : {};
const prev = previousValues ? previousValues[dataKey] : undefined;
const percentage = ((value - prev) / prev) * 100 ?? undefined;
const percentage = ((value - prev) / prev) * 100;
const color = getBadgeColor(percentage);

return (
Expand Down Expand Up @@ -315,7 +315,7 @@ export const CustomTooltipComplex: Story = {
const previousIndex = data.findIndex((e) => e[customTooltipIndex] === label);
const previousValues: any = previousIndex > 0 ? data[previousIndex - 1] : {};
const prev = previousValues ? previousValues[dataKey] : undefined;
const percentage = ((value - prev) / prev) * 100 ?? undefined;
const percentage = ((value - prev) / prev) * 100;
const badgeColor = getBadgeColor(percentage);

return (
Expand Down
4 changes: 2 additions & 2 deletions src/stories/chart-elements/BarChart.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export const CustomTooltipPreviousDay: Story = {
const previousIndex = data.findIndex((e) => e[customTooltipIndex] === label);
const previousValues: any = previousIndex > 0 ? data[previousIndex - 1] : {};
const prev = previousValues ? previousValues[dataKey] : undefined;
const percentage = ((value - prev) / prev) * 100 ?? undefined;
const percentage = ((value - prev) / prev) * 100;
const color = getBadgeColor(percentage);

return (
Expand Down Expand Up @@ -331,7 +331,7 @@ export const CustomTooltipComplex: Story = {
const previousIndex = data.findIndex((e) => e[customTooltipIndex] === label);
const previousValues: any = previousIndex > 0 ? data[previousIndex - 1] : {};
const prev = previousValues ? previousValues[dataKey] : undefined;
const percentage = ((value - prev) / prev) * 100 ?? undefined;
const percentage = ((value - prev) / prev) * 100;
const badgeColor = getBadgeColor(percentage);

return (
Expand Down
4 changes: 2 additions & 2 deletions src/stories/chart-elements/LineChart.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export const CustomTooltipPreviousDay: Story = {
const previousIndex = data.findIndex((e) => e[customTooltipIndex] === label);
const previousValues: any = previousIndex > 0 ? data[previousIndex - 1] : {};
const prev = previousValues ? previousValues[dataKey] : undefined;
const percentage = ((value - prev) / prev) * 100 ?? undefined;
const percentage = ((value - prev) / prev) * 100;
const color = getBadgeColor(percentage);

return (
Expand Down Expand Up @@ -275,7 +275,7 @@ export const CustomTooltipComplex: Story = {
const previousIndex = data.findIndex((e) => e[customTooltipIndex] === label);
const previousValues: any = previousIndex > 0 ? data[previousIndex - 1] : {};
const prev = previousValues ? previousValues[dataKey] : undefined;
const percentage = ((value - prev) / prev) * 100 ?? undefined;
const percentage = ((value - prev) / prev) * 100;
const badgeColor = getBadgeColor(percentage);

return (
Expand Down

0 comments on commit c681b69

Please sign in to comment.