Skip to content

Commit

Permalink
feat: Deprecated Table in Main
Browse files Browse the repository at this point in the history
  • Loading branch information
thunguyen19 committed Sep 20, 2023
1 parent 9c5d040 commit f89fc30
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/react/table/lib/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ const TableComponent = styled('table')(type.levels.subtext.large, {
},
});

/**
* ### ⚠️ Table has been deprecated and will be removed in v9 ⚠️
* - Please consider using [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in preview
* @deprecated
*/
export class Table extends React.Component<React.TableHTMLAttributes<HTMLTableElement>> {
public render() {
const {children, ...elemProps} = this.props;
Expand Down
15 changes: 15 additions & 0 deletions modules/react/table/lib/TableRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import {colors, space, spaceNumbers, statusColors} from '@workday/canvas-kit-rea
import {createComponent, StyledType} from '@workday/canvas-kit-react/common';
import {borderColor, borderWidth, cellBorder} from './Table';

/**
* ### ⚠️ Table has been deprecated and will be removed in v9 ⚠️
* - Please consider using [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in preview
* @deprecated
*/
export enum TableRowState {
Error,
Alert,
Expand All @@ -14,6 +19,11 @@ export enum TableRowState {
Selected,
}

/**
* ### ⚠️ Table has been deprecated and will be removed in v9 ⚠️
* - Please consider using [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in preview
* @deprecated
*/
export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
/**
* The state of the TableRow. Accepts `Error`, `Alert`, `InputError`, `InputAlert`, `Hover`, or `Selected`.
Expand Down Expand Up @@ -192,6 +202,11 @@ const StyledTableRow = styled('tr')<TableRowProps>(
}
);

/**
* ### ⚠️ Table has been deprecated and will be removed in v9 ⚠️
* - Please consider using [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in preview
* @deprecated
*/
export const TableRow = createComponent('tr')({
displayName: 'TableRow',
Component: (
Expand Down

0 comments on commit f89fc30

Please sign in to comment.