import React from "react";
import { DataEditorAll as DataEditor } from "../../data-editor-all.js";
import {
BeautifulWrapper,
Description,
MoreInfo,
PropName,
useMockDataGenerator,
defaultProps,
} from "../../data-editor/stories/utils.js";
import { SimpleThemeWrapper } from "../../stories/story-utils.js";
export default {
title: "Glide-Data-Grid/DataEditor Demos",
decorators: [
(Story: React.ComponentType) => (
The row size can be controlled with rowHeight and the header size
with headerHeight.
Use the story's controls to resize them
>
}>
),
],
};
interface RowAndHeaderSizesProps {
rowHeight: number;
headerHeight: number;
}
export const RowAndHeaderSizes: React.VFC = p => {
const { cols, getCellContent } = useMockDataGenerator(6);
return (
);
};
(RowAndHeaderSizes as any).args = {
rowHeight: 34,
headerHeight: 34,
};
(RowAndHeaderSizes as any).argTypes = {
rowHeight: {
control: {
type: "range",
min: 20,
max: 200,
},
},
headerHeight: {
control: {
type: "range",
min: 20,
max: 200,
},
},
};