@pushwoosh/dumb-components 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,7 @@ export function DataTable(props) {
15
15
  columns,
16
16
  width,
17
17
  isBordered = true,
18
+ paginationPadding,
18
19
  context,
19
20
  renderTableTop,
20
21
  renderAfter,
@@ -34,7 +35,8 @@ export function DataTable(props) {
34
35
  }, renderTableTop === null || renderTableTop === void 0 ? void 0 : renderTableTop(context), 'renderHead' in props && props.renderHead(), 'renderList' in props ? props.renderList(context) : React.createElement(DataTableList, {
35
36
  renderItem: props.renderItem
36
37
  }), !hidePagination && React.createElement(DataTablePagination, {
37
- allLimits: [10, 20, 50, 100]
38
+ allLimits: [10, 20, 50, 100],
39
+ padding: paginationPadding
38
40
  }, data.loading && React.createElement(Horizontal, {
39
41
  "$gap": Spacing.S1,
40
42
  "$alignItems": "center"
@@ -6,6 +6,7 @@ export type DataTableListProps<I, P extends DataTableParams> = {
6
6
  isBordered?: boolean;
7
7
  context: DataTableContextType<I, P>;
8
8
  hidePagination?: boolean;
9
+ paginationPadding?: string;
9
10
  renderTableTop?: (ctxValue: DataTableContextType<I, P>) => ReactNode;
10
11
  renderList: (ctxValue: DataTableContextType<I, P>) => ReactNode;
11
12
  renderAfter?: (ctxValue: DataTableContextType<I, P>) => ReactNode;
@@ -16,6 +17,7 @@ export type DataTableItemProps<I, P extends DataTableParams> = {
16
17
  isBordered?: boolean;
17
18
  context: DataTableContextType<I, P>;
18
19
  hidePagination?: boolean;
20
+ paginationPadding?: string;
19
21
  renderTableTop?: (ctxValue: DataTableContextType<I, P>) => ReactNode;
20
22
  renderHead: () => ReactNode;
21
23
  renderItem: (item: I) => ReactNode;
@@ -1,3 +1,3 @@
1
1
  import { type ReactElement } from 'react';
2
2
  import type { DataTablePaginationProps } from './types';
3
- export declare function DataTablePagination({ allLimits, children }: DataTablePaginationProps): ReactElement;
3
+ export declare function DataTablePagination({ allLimits, padding, children }: DataTablePaginationProps): ReactElement;
@@ -3,6 +3,7 @@ import { DataTableContext } from '../../context';
3
3
  import { TablePagination } from '../TablePagination';
4
4
  export function DataTablePagination({
5
5
  allLimits,
6
+ padding,
6
7
  children
7
8
  }) {
8
9
  var _data$value;
@@ -22,6 +23,7 @@ export function DataTablePagination({
22
23
  page
23
24
  });
24
25
  },
26
+ padding: padding,
25
27
  onChangeLimit: perPage => {
26
28
  onChangeParams({
27
29
  ...params,
@@ -1,4 +1,5 @@
1
1
  import type { PropsWithChildren } from 'react';
2
2
  export type DataTablePaginationProps = PropsWithChildren<{
3
3
  allLimits: number[];
4
+ padding?: string;
4
5
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",