Skip to content

Commit

Permalink
fix: deprecated containedlist.containedlistitem (carbon-design-system…
Browse files Browse the repository at this point in the history
  • Loading branch information
Gururajj77 authored May 23, 2024
1 parent cfb682c commit e048761
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function TestComponent({ list, item }) {

beforeEach(() => {
// eslint-disable-next-line testing-library/no-render-in-lifecycle
jest.mock('../../../internal/deprecateFieldOnObject');
wrapper = render(<TestComponent />);
});

Expand Down
4 changes: 4 additions & 0 deletions packages/react/src/components/ContainedList/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
* LICENSE file in the root directory of this source tree.
*/

import { deprecateFieldOnObject } from '../../internal/deprecateFieldOnObject';
import ContainedList from './ContainedList';
import ContainedListItem from './ContainedListItem';

ContainedList.ContainedListItem = ContainedListItem;

if (__DEV__) {
deprecateFieldOnObject(ContainedList, 'ContainedListItem', ContainedListItem);
}
export { ContainedListItem };
export default ContainedList;
export { ContainedList };

0 comments on commit e048761

Please sign in to comment.