Skip to content

Commit 48c18a9

Browse files
committed
fix(CTable): add proper interface to td i th
1 parent e818a28 commit 48c18a9

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/components/table/CTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import React, { forwardRef, HTMLAttributes } from 'react'
1+
import React, { forwardRef, TableHTMLAttributes } from 'react'
22
import PropTypes from 'prop-types'
33
import classNames from 'classnames'
44

55
import { Colors, colorPropType } from '../Types'
66

7-
export interface CTableProps extends HTMLAttributes<HTMLTableElement> {
7+
export interface CTableProps extends TableHTMLAttributes<HTMLTableElement> {
88
/**
99
* Set the vertical aligment. [docs]
1010
*/

src/components/table/CTableDataCell.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import React, { forwardRef, HTMLAttributes } from 'react'
1+
import React, { forwardRef, TdHTMLAttributes } from 'react'
22
import PropTypes from 'prop-types'
33
import classNames from 'classnames'
44

55
import { Colors, colorPropType } from '../Types'
66

7-
export interface CTableDataCellProps extends HTMLAttributes<HTMLTableDataCellElement> {
7+
export interface CTableDataCellProps
8+
extends Omit<TdHTMLAttributes<HTMLTableDataCellElement>, 'align'> {
89
/**
910
* Highlight a table row or cell. [docs]
1011
*/

src/components/table/CTableHeaderCell.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import React, { forwardRef, HTMLAttributes } from 'react'
1+
import React, { forwardRef, ThHTMLAttributes } from 'react'
22
import PropTypes from 'prop-types'
33
import classNames from 'classnames'
44

55
import { Colors, colorPropType } from '../Types'
66

7-
export interface CTableHeaderCellProps extends HTMLAttributes<HTMLTableHeaderCellElement> {
7+
export interface CTableHeaderCellProps extends ThHTMLAttributes<HTMLTableHeaderCellElement> {
88
/**
99
* A string of all className you want applied to the component. [docs]
1010
*/

0 commit comments

Comments
 (0)