Skip to content

Commit

Permalink
🏷️(react) fix stories warning
Browse files Browse the repository at this point in the history
Having private props was causing the following error: Default export
of the module has or is using private name 'Props'. So exporting those
fixes the issue. It also has a double benefit as we provide exported
Props to library consummers.
  • Loading branch information
NathanVss committed Dec 12, 2023
1 parent bdf1792 commit 311c20e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/components/DataGrid/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface BaseProps<T extends Row = Row> {
rowSelection?: RowSelectionState;
}

interface Props<T extends Row = Row> extends BaseProps<T> {
export interface DataGridProps<T extends Row = Row> extends BaseProps<T> {
pagination?: PaginationProps;
sortModel?: SortModel;
onSortModelChange?: (newSortModel: SortModel) => void;
Expand All @@ -75,7 +75,7 @@ export const DataGrid = <T extends Row>({
rowSelection,
tableOptions,
displayHeader = true,
}: Props<T>) => {
}: DataGridProps<T>) => {
const { t } = useCunningham();
const headlessColumns = useHeadlessColumns({ columns, enableRowSelection });

Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/components/Loader/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from "react";
import classNames from "classnames";

interface Props {
export interface LoaderProps {
"aria-label"?: string;
size?: "small" | "medium";
}

export const Loader = ({ size = "medium", ...props }: Props) => {
export const Loader = ({ size = "medium", ...props }: LoaderProps) => {
return (
<div
className={classNames("c__loader", "c__loader--" + size)}
Expand Down

0 comments on commit 311c20e

Please sign in to comment.