@dtdot/lego 0.17.17 → 0.17.19

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.
@@ -12,6 +12,6 @@ declare const Table: {
12
12
  ({ children, variant }: TableProps): JSX.Element;
13
13
  Row: ({ children }: import("./_TableRow.component").TableRowProps) => JSX.Element;
14
14
  Cell: import("styled-components").StyledComponent<"td", import("styled-components").DefaultTheme, TableCellProps, never>;
15
- Action: ({ text }: import("./_TableAction").TableActionProps) => JSX.Element;
15
+ Action: ({ text, onClick }: import("./_TableAction").TableActionProps) => JSX.Element;
16
16
  };
17
17
  export default Table;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Card, ProfileImage, Table } from '../..';
3
+ /* eslint-disable @typescript-eslint/no-empty-function */
3
4
  const fakeData = [
4
5
  {
5
6
  count: 57,
@@ -45,7 +46,7 @@ export const WithActions = () => (React.createElement(Table, null, fakeData.map(
45
46
  React.createElement(Table.Cell, null, data.count),
46
47
  React.createElement(Table.Cell, null, data.name),
47
48
  React.createElement(Table.Cell, null,
48
- React.createElement(Table.Action, { text: 'filter' })))))));
49
+ React.createElement(Table.Action, { onClick: () => { }, text: 'filter' })))))));
49
50
  export const InCard = () => (React.createElement(Card, { padded: true, size: 'sm' },
50
51
  React.createElement(Table, null,
51
52
  React.createElement(Table.Row, null,
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export interface TableActionProps {
3
3
  text: string;
4
+ onClick: () => void;
4
5
  }
5
- declare const TableAction: ({ text }: TableActionProps) => JSX.Element;
6
+ declare const TableAction: ({ text, onClick }: TableActionProps) => JSX.Element;
6
7
  export default TableAction;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import Button from '../Button/Button.component';
3
- const TableAction = ({ text }) => {
4
- return React.createElement(Button, { variant: 'tertiary' }, text);
3
+ const TableAction = ({ text, onClick }) => {
4
+ return (React.createElement(Button, { variant: 'tertiary', onClick: onClick }, text));
5
5
  };
6
6
  export default TableAction;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dtdot/lego",
3
- "version": "0.17.17",
3
+ "version": "0.17.19",
4
4
  "description": "Some reusable components for building my applications",
5
5
  "main": "build/index.js",
6
6
  "scripts": {