@dtdot/lego 2.0.0-29 → 2.0.0-30

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.
@@ -11,7 +11,7 @@ export interface TableCellProps {
11
11
  }
12
12
  declare const Table: {
13
13
  ({ children, variant }: TableProps): JSX.Element;
14
- Row: ({ children, "data-testid": dataTestId }: import("./_TableRow.component").TableRowProps) => JSX.Element;
14
+ Row: ({ children, "data-testid": dataTestId, border }: import("./_TableRow.component").TableRowProps) => JSX.Element;
15
15
  Cell: import("styled-components").StyledComponent<"td", import("styled-components").DefaultTheme, TableCellProps, never>;
16
16
  ActionContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
17
17
  Action: ({ text, variant, icon, onClick, "data-testid": dataTestId }: TableActionProps) => JSX.Element;
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  export interface TableRowProps {
3
3
  'children': React.ReactNode;
4
+ 'border'?: boolean;
4
5
  'data-testid'?: string;
5
6
  }
6
- declare const TableRow: ({ children, "data-testid": dataTestId }: TableRowProps) => JSX.Element;
7
+ declare const TableRow: ({ children, "data-testid": dataTestId, border }: TableRowProps) => JSX.Element;
7
8
  export default TableRow;
@@ -3,8 +3,10 @@ import { useContext } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import TableContext from './_Table.context';
5
5
  const StyledRow = styled.tr `
6
- box-shadow: 0px 1px 0px 0px
7
- ${(props) => (props.variant === 'regular' ? props.theme.colours.defaultBorder : props.theme.colours.faintBorder)};
6
+ ${(props) => props.border &&
7
+ `
8
+ box-shadow: 0px 1px 0px 0px ${props.variant === 'regular' ? props.theme.colours.defaultBorder : props.theme.colours.faintBorder}
9
+ `}
8
10
 
9
11
  &:last-child {
10
12
  box-shadow: none;
@@ -14,8 +16,8 @@ const StyledRow = styled.tr `
14
16
  background-color: ${(props) => props.theme.colours.cardBackground};
15
17
  }
16
18
  `;
17
- const TableRow = ({ children, 'data-testid': dataTestId }) => {
19
+ const TableRow = ({ children, 'data-testid': dataTestId, border = false }) => {
18
20
  const { variant } = useContext(TableContext);
19
- return (React.createElement(StyledRow, { variant: variant, "data-testid": dataTestId }, children));
21
+ return (React.createElement(StyledRow, { variant: variant, "data-testid": dataTestId, border: border }, children));
20
22
  };
21
23
  export default TableRow;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dtdot/lego",
3
- "version": "2.0.0-29",
3
+ "version": "2.0.0-30",
4
4
  "description": "Some reusable components for building my applications",
5
5
  "main": "build/index.js",
6
6
  "scripts": {