Skip to content

Commit d520b2b

Browse files
committed
chore: add default styles to content
1 parent 02db44f commit d520b2b

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

packages/raystack/components/data-table/components/content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export function Content({
237237
: null;
238238

239239
return (
240-
<div className={classNames.root}>
240+
<div className={cx(styles.contentRoot, classNames.root)}>
241241
<Table className={classNames.table}>
242242
{hasData && (
243243
<Headers headerGroups={headerGroups} className={classNames.header} />

packages/raystack/components/data-table/components/virtualized-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ const DefaultEmptyComponent = () => (
163163
);
164164

165165
export function VirtualizedContent({
166-
height,
166+
height = '100%',
167167
rowHeight = 40,
168168
groupHeaderHeight,
169169
overscan = 5,

packages/raystack/components/data-table/data-table.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
flex: 1;
4646
}
4747

48+
.contentRoot {
49+
height: 100%;
50+
overflow: auto;
51+
}
52+
4853
.row {
4954
background: var(--rs-color-background-base-primary);
5055
}

packages/raystack/components/data-table/data-table.types.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export type DataTableContentBaseProps = {
128128
export type DataTableContentProps = DataTableContentBaseProps;
129129

130130
export type VirtualizedContentProps = DataTableContentBaseProps & {
131-
height: number | string;
131+
height?: number | string;
132132
rowHeight?: number;
133133
groupHeaderHeight?: number;
134134
overscan?: number;

0 commit comments

Comments
 (0)