🏷️(react) fix stories warning

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.
This commit is contained in:
Nathan Vasse
2023-12-11 15:20:37 +01:00
committed by NathanVss
parent bdf17929ba
commit 311c20e3e7
2 changed files with 4 additions and 4 deletions

View File

@@ -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;
@@ -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 });

View File

@@ -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)}