Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Deprecated Table in Main #2344

Merged
merged 2 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions modules/docs/mdx/10.0-UPGRADE_GUIDE.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ any questions.
- [useBanner](#useBanner)
- [Deprecations](#deprecations)
- [InputIconContainer](#input-icon-container)
- [Table](#table)
- [Token Updates](#token-updates)
- [Space and Depth](#space-and-depth)
- [Component Updates](#component-updates)
Expand Down Expand Up @@ -70,6 +71,10 @@ and browsers can compute the name of the Banner from the text given inside.
We've deprecated `InputIconContainer` from [Main](#main) because it doesn't handle
bidirectionality or icons at the start of an input. Please consider using [`InputGroup`](https://workday.github.io/canvas-kit/?path=/story/components-inputs-text-input--icons) instead.

### Table

We've deprecated `Table` and `TableRow` as well as all of their exported members. Please consider using [`Table in Preview`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) instead.

## Token Updates

### Space and Depth
Expand Down
4 changes: 4 additions & 0 deletions modules/react/table/lib/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ const TableComponent = styled('table')(type.levels.subtext.large, {
},
});

/**
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version.
* Please consider using [`Table in Preview`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) instead.
*/
export class Table extends React.Component<React.TableHTMLAttributes<HTMLTableElement>> {
public render() {
const {children, ...elemProps} = this.props;
Expand Down
12 changes: 12 additions & 0 deletions modules/react/table/lib/TableRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ 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';

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

/**
* @deprecated ⚠️ `Table` has been deprecated and will be removed in a future major version.
* Please consider using [`Table in Preview`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) instead.
*/
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 +200,10 @@ const StyledTableRow = styled('tr')<TableRowProps>(
}
);

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