🏷️(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:
@@ -54,7 +54,7 @@ export interface BaseProps<T extends Row = Row> {
|
|||||||
rowSelection?: RowSelectionState;
|
rowSelection?: RowSelectionState;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Props<T extends Row = Row> extends BaseProps<T> {
|
export interface DataGridProps<T extends Row = Row> extends BaseProps<T> {
|
||||||
pagination?: PaginationProps;
|
pagination?: PaginationProps;
|
||||||
sortModel?: SortModel;
|
sortModel?: SortModel;
|
||||||
onSortModelChange?: (newSortModel: SortModel) => void;
|
onSortModelChange?: (newSortModel: SortModel) => void;
|
||||||
@@ -75,7 +75,7 @@ export const DataGrid = <T extends Row>({
|
|||||||
rowSelection,
|
rowSelection,
|
||||||
tableOptions,
|
tableOptions,
|
||||||
displayHeader = true,
|
displayHeader = true,
|
||||||
}: Props<T>) => {
|
}: DataGridProps<T>) => {
|
||||||
const { t } = useCunningham();
|
const { t } = useCunningham();
|
||||||
const headlessColumns = useHeadlessColumns({ columns, enableRowSelection });
|
const headlessColumns = useHeadlessColumns({ columns, enableRowSelection });
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
|
|
||||||
interface Props {
|
export interface LoaderProps {
|
||||||
"aria-label"?: string;
|
"aria-label"?: string;
|
||||||
size?: "small" | "medium";
|
size?: "small" | "medium";
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Loader = ({ size = "medium", ...props }: Props) => {
|
export const Loader = ({ size = "medium", ...props }: LoaderProps) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={classNames("c__loader", "c__loader--" + size)}
|
className={classNames("c__loader", "c__loader--" + size)}
|
||||||
|
|||||||
Reference in New Issue
Block a user