Skip to content

Commit 0915c58

Browse files
authored
fix: add layout props to TableHeaderCell and TableCell (#185)
1 parent 3f561d0 commit 0915c58

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/components/Table/components/TableCell.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import React, { ComponentPropsWithoutRef, FC, useContext } from 'react';
22
import styled from 'styled-components';
3-
import { compose, textAlign, TextAlignProps } from 'styled-system';
3+
import { compose, LayoutProps, textAlign, TextAlignProps } from 'styled-system';
44
import { TableContext } from '../context/TableContext';
55
import { TableProps } from './Table';
66

7-
type TableCellProps = Pick<TableProps, 'rowSize' | 'columnSpace'> & ComponentPropsWithoutRef<'td'> & TextAlignProps;
7+
type TableCellProps = Pick<TableProps, 'rowSize' | 'columnSpace'> &
8+
ComponentPropsWithoutRef<'td'> &
9+
TextAlignProps &
10+
LayoutProps;
811

912
const TableCellElement = styled.td<TableCellProps>`
1013
height: ${p => p.rowSize};

src/components/Table/components/TableHeaderCell.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { ComponentPropsWithoutRef, FC, useContext } from 'react';
22
import styled from 'styled-components';
3-
import { compose, textAlign, TextAlignProps } from 'styled-system';
3+
import { compose, LayoutProps, textAlign, TextAlignProps } from 'styled-system';
44
import { Colors } from '../../../essentials';
55
import { theme } from '../../../essentials/theme';
66
import { get } from '../../../utils/themeGet';
@@ -9,7 +9,8 @@ import { TableProps } from './Table';
99

1010
type TableHeaderCellProps = Pick<TableProps, 'rowSize' | 'columnSpace'> &
1111
ComponentPropsWithoutRef<'th'> &
12-
TextAlignProps;
12+
TextAlignProps &
13+
LayoutProps;
1314

1415
const TableHeaderCellElement = styled.th.attrs({ theme })<TableHeaderCellProps>`
1516
border-bottom: 0.0625rem solid ${Colors.AUTHENTIC_BLUE_550} !important;

0 commit comments

Comments
 (0)