Skip to content

Commit

Permalink
barlist
Browse files Browse the repository at this point in the history
  • Loading branch information
severinlandolt committed Dec 11, 2024
1 parent 706d202 commit a970232
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/vis-elements/BarList/BarList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type Bar<T> = T & {
color?: Color;
};

export interface BarListProps<T = any> extends React.HTMLAttributes<HTMLDivElement> {
interface BarListProps<T = any> extends React.HTMLAttributes<HTMLDivElement> {
data: Bar<T>[];
valueFormatter?: ValueFormatter;
color?: Color;
Expand Down Expand Up @@ -179,4 +179,4 @@ const BarList = React.forwardRef(BarListInner) as <T>(
p: BarListProps<T> & { ref?: React.ForwardedRef<HTMLDivElement> },
) => ReturnType<typeof BarListInner>;

export default BarList;
export { BarList, type BarListProps };
2 changes: 1 addition & 1 deletion src/components/vis-elements/BarList/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { default as BarList } from "./BarList";
export { BarList } from "./BarList";
export type { BarListProps } from "./BarList";
4 changes: 1 addition & 3 deletions src/tests/vis-elements/BarList.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
/* eslint-disable no-undef */
import { render } from "@testing-library/react";
import { BarList } from "components";
import React from "react";

import BarList from "components/vis-elements/BarList/BarList";

describe("BarList", () => {
test("renders the BarList component with default props", () => {
render(
Expand Down
3 changes: 1 addition & 2 deletions src/tests/vis-elements/ProgressBar.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* eslint-disable no-undef */
import { render } from "@testing-library/react";
import { ProgressBar } from "components";
import React from "react";

import ProgressBar from "components/vis-elements/ProgressBar/ProgressBar";

describe("ProgressBar", () => {
test("renders the ProgressBar component with default props", () => {
render(<ProgressBar value={50} />);
Expand Down

0 comments on commit a970232

Please sign in to comment.