From 311c20e3e7e8796229b2279f22c3c1b79c0fb661 Mon Sep 17 00:00:00 2001 From: Nathan Vasse Date: Mon, 11 Dec 2023 15:20:37 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F(react)=20fix=20stories=20?= =?UTF-8?q?warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- packages/react/src/components/DataGrid/index.tsx | 4 ++-- packages/react/src/components/Loader/index.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react/src/components/DataGrid/index.tsx b/packages/react/src/components/DataGrid/index.tsx index 6810fd3..86db957 100644 --- a/packages/react/src/components/DataGrid/index.tsx +++ b/packages/react/src/components/DataGrid/index.tsx @@ -54,7 +54,7 @@ export interface BaseProps { rowSelection?: RowSelectionState; } -interface Props extends BaseProps { +export interface DataGridProps extends BaseProps { pagination?: PaginationProps; sortModel?: SortModel; onSortModelChange?: (newSortModel: SortModel) => void; @@ -75,7 +75,7 @@ export const DataGrid = ({ rowSelection, tableOptions, displayHeader = true, -}: Props) => { +}: DataGridProps) => { const { t } = useCunningham(); const headlessColumns = useHeadlessColumns({ columns, enableRowSelection }); diff --git a/packages/react/src/components/Loader/index.tsx b/packages/react/src/components/Loader/index.tsx index d36006a..d585294 100644 --- a/packages/react/src/components/Loader/index.tsx +++ b/packages/react/src/components/Loader/index.tsx @@ -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 (