@homecode/ui 4.27.9 → 4.27.10

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.
@@ -8,9 +8,9 @@ import S from './Table.styl.js';
8
8
 
9
9
  class Table extends Component {
10
10
  renderHeaderColumn = ({ id, label, sticky }) => (jsx("th", { className: cn(sticky && S.sticky), children: label }, id));
11
- renderRow = data => {
11
+ renderRow = (data) => {
12
12
  const { columns } = this.props;
13
- return (jsx("tr", { children: columns.map(param => this.renderDataCol(param, data)) }, data.id));
13
+ return (jsx("tr", { className: data.className, children: columns.map(param => this.renderDataCol(param, data)) }, data.id));
14
14
  };
15
15
  renderDataCol({ id, dataField, render, sticky }, data) {
16
16
  return (jsx("td", { className: cn(sticky && S.sticky), children: render ? render(data) : data[dataField || id] }, id));
@@ -2,7 +2,7 @@ import { Component } from 'react';
2
2
  import * as T from './Table.types';
3
3
  export declare class Table extends Component<T.Props> {
4
4
  renderHeaderColumn: ({ id, label, sticky }: T.Column) => JSX.Element;
5
- renderRow: (data: any) => JSX.Element;
5
+ renderRow: (data: T.Data) => JSX.Element;
6
6
  renderDataCol({ id, dataField, render, sticky }: T.Column, data: T.Data): JSX.Element;
7
7
  render(): JSX.Element;
8
8
  }
@@ -9,6 +9,7 @@ export type Column = {
9
9
  };
10
10
  export type Data = {
11
11
  id: string;
12
+ className?: string;
12
13
  } & any;
13
14
  export type Props = ComponentType & {
14
15
  columns: Column[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.27.9",
3
+ "version": "4.27.10",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "tests": "jest",